/* Grokar theme for the Dev AI tool pages.
   Loaded after app.css. It only redefines the design tokens app.css already
   uses (so every component follows) and styles the Grokar top bar that
   grokar.js adds. Colours, type, radius and shadows match grokar.ai:
   warm paper, near-black ink, Fraunces headings, Inter text, Dev's pine green
   as the action colour. Light only, like the website. */

:root {
  --bg: #faf8f5;
  --card: #fffdfa;
  --ink: #1c1917;
  --muted: #746c62;
  --line: #e5ddd0;
  --brand: #17614a;
  --brand-ink: #ffffff;
  --brand-soft: #e5f2ec;
  --star: #d98a0b;
  --star-soft: #fdf1dc;
  --good: #17614a;
  --good-soft: #e5f2ec;
  --warn: #a23a1b;
  --warn-soft: #fdeee6;
  --radius: 22px;
  --shadow: 0 2px 4px rgba(60, 40, 20, 0.05), 0 12px 32px rgba(60, 40, 20, 0.08);
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --grokar-red: #e12d4c;
}

/* The website is light-only; keep the tool the same so a visitor moving between
   them does not get a colour change. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #faf8f5;
    --card: #fffdfa;
    --ink: #1c1917;
    --muted: #746c62;
    --line: #e5ddd0;
    --brand: #17614a;
    --brand-ink: #ffffff;
    --brand-soft: #e5f2ec;
    --star: #d98a0b;
    --star-soft: #fdf1dc;
    --good: #17614a;
    --good-soft: #e5f2ec;
    --warn: #a23a1b;
    --warn-soft: #fdeee6;
    --shadow: 0 2px 4px rgba(60, 40, 20, 0.05), 0 12px 32px rgba(60, 40, 20, 0.08);
  }
}

/* app.css lays the page out as a centred flex row (body { display:flex }). The
   bar takes a full row of its own above it and bleeds past the body padding. */
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; flex-wrap: wrap; align-content: flex-start; padding-top: 0; }
body > .grokar-bar { flex: 0 0 calc(100% + 32px); width: calc(100% + 32px); margin: 0 -16px 24px; }

h1, h2, h3 { letter-spacing: -0.02em; font-weight: 600; }

/* ---------- Grokar top bar (markup from grokar.js) ---------- */

.grokar-bar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 248, 245, 0.86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.grokar-bar-in {
  max-width: 1160px; margin-inline: auto; padding: 0 clamp(16px, 4vw, 40px);
  height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.grokar-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.grokar-brand img { width: 30px; height: 30px; display: block; }
.grokar-brand b { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; letter-spacing: -0.03em; line-height: 1; }
.grokar-brand b small { font-family: var(--sans); font-size: 0.6em; font-weight: 650; letter-spacing: 0.04em; color: var(--muted); margin-left: 5px; vertical-align: 0.15em; }
.grokar-brand .sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
.grokar-brand .tool { font-size: 0.92rem; font-weight: 600; color: var(--brand); }
.grokar-bar-links { display: flex; align-items: center; gap: 4px; }
.grokar-bar-links a {
  text-decoration: none; color: var(--muted); font-size: 0.9rem; font-weight: 520;
  padding: 8px 12px; border-radius: 999px; transition: background 0.15s, color 0.15s;
}
.grokar-bar-links a:hover { background: #ece5da; color: var(--ink); }
.grokar-bar-links a.primary { background: var(--ink); color: #faf8f5; font-weight: 600; }
.grokar-bar-links a.primary:hover { background: #000; }
@media (max-width: 640px) {
  .grokar-brand .tool, .grokar-brand .sep { display: none; }
  .grokar-bar-links a:not(.primary) { display: none; }
}

/* The customer-facing review page (/r/…) is the business's page, not ours: the
   bar steps back to a single quiet line so the shop's name stays the hero. */
body.grokar-quiet .grokar-bar { position: static; background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.grokar-quiet .grokar-bar-in { height: 44px; justify-content: center; }
body.grokar-quiet .grokar-brand b, body.grokar-quiet .grokar-brand .sep, body.grokar-quiet .grokar-bar-links { display: none; }
body.grokar-quiet .grokar-brand .tool { display: inline; color: var(--muted); font-weight: 500; font-size: 0.8rem; }
body.grokar-quiet .grokar-brand img { width: 18px; height: 18px; }

/* The old "← Back to Dev AI chat" line duplicates the bar. */
.grokar-hide { display: none !important; }

/* ---------- Second pass: layout, type and controls to match grokar.ai ---------- */

.wrap { max-width: 620px; }
.wrap--wide { max-width: 820px; }
body { padding-bottom: 72px; }

/* Headings: Fraunces at the website's weight and tightness, a notch larger. */
.hero { margin: 16px 0 28px; }
.hero .eyebrow { color: var(--brand); font-size: 0.78rem; letter-spacing: 0.1em; font-weight: 650; }
.hero .eyebrow::before { content: '\2014\00a0'; }
.hero h1 { font-size: clamp(2rem, 4.2vw, 2.7rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.08; margin-top: 10px; }
.hero .hero-sub { font-size: 1.05rem; line-height: 1.55; max-width: 58ch; margin: 14px auto 0; }
.hero .hero-meta { font-size: 0.86rem; }
h1 { font-weight: 600; letter-spacing: -0.025em; font-size: 1.7rem; line-height: 1.15; }
h2 { font-size: 1.12rem; font-weight: 650; letter-spacing: -0.015em; }
.muted { font-size: 0.92rem; }
p { line-height: 1.6; }

/* Cards and controls: the website's rounder, softer shapes. */
.card { padding: 26px; margin-bottom: 18px; }
@media (max-width: 560px) { .card { padding: 20px; } }
input[type='text'], input[type='url'], textarea { border-radius: 14px; background: var(--card); padding: 14px 16px; }
input:focus, textarea:focus { box-shadow: 0 0 0 4px var(--brand-soft); }
label { font-size: 0.9rem; }

button { border-radius: 999px; padding: 13px 22px; font-weight: 600; letter-spacing: -0.005em; }
.btn-primary, .btn-google {
  background: linear-gradient(135deg, #35976f, #17614a);
  color: #fff; border-radius: 999px;
  box-shadow: 0 6px 20px rgba(23, 97, 74, 0.28);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.btn-primary:hover:not(:disabled), .btn-google:hover:not(:disabled) { filter: none; transform: translateY(-1px); box-shadow: 0 10px 28px rgba(23, 97, 74, 0.36); }
.btn-google { padding: 16px 22px; }
.btn-ghost { border-radius: 999px; border-color: var(--line); color: var(--ink); background: var(--card); }
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); background: var(--card); }
.chip { border-radius: 999px; }

.authbar { background: var(--card); border-color: var(--line); padding: 9px 18px; font-size: 0.88rem; }

/* Footer line added by grokar.js. */
body > .grokar-foot { flex: 0 0 100%; width: 100%; text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--muted); }
.grokar-foot a { color: var(--muted); text-decoration: none; }
.grokar-foot a:hover { color: var(--ink); }
.grokar-foot b { color: var(--ink); font-weight: 600; }

@media (max-width: 640px) { .authbar { border-radius: 16px; } }

/* The customer page already says "Powered by Dev AI"; one footer is enough. */
body.grokar-quiet .grokar-foot { display: none; }


/* ---------- Result screen: the counter card on the left, the links on the right ---------- */

.result-grid { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 720px) { .result-grid { grid-template-columns: 1fr; } }
.result-card-col { display: grid; gap: 12px; }
.result-card-col .btn-primary { width: 100%; }
a.btn-primary { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; padding: 13px 22px; border-radius: 999px; font-weight: 600; box-sizing: border-box; }
.pc-note { font-size: 0.82rem; margin: 0; }
.result-side { display: grid; gap: 16px; min-width: 0; }
.result-side .biz { margin: 0; }
.result-side .notice { margin: 0; }
.result-side .result-link label { display: block; margin-bottom: 6px; }

/* The card, drawn the same way the PDF draws it. */
.print-card {
  border-radius: 14px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow); container-type: inline-size;
  display: flex; flex-direction: column; text-align: center;
}
.pc-band { background: #17614a; color: #fff; padding: 8cqw 7cqw 7cqw; }
.pc-eyebrow { font-size: 3.6cqw; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.82; }
.pc-name { font-family: var(--serif); font-size: 9.5cqw; font-weight: 600; line-height: 1.1; margin-top: 2.5cqw; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.pc-addr { font-size: 3.6cqw; opacity: 0.8; margin-top: 1.5cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-stripe { display: flex; height: 1.6cqw; }
.pc-stripe i { flex: 1; }
.pc-stripe i:nth-child(1) { background: #4285F4; } .pc-stripe i:nth-child(2) { background: #EA4335; }
.pc-stripe i:nth-child(3) { background: #FBBC05; } .pc-stripe i:nth-child(4) { background: #34A853; }
.pc-body { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 7cqw 7cqw 5cqw; gap: 2.4cqw; }
.pc-qr { width: 62cqw; padding: 2.4cqw; border: 1px solid #ddd; border-radius: 2.4cqw; background: #fff; }
.pc-qr img { display: block; width: 100%; height: auto; }
.pc-cta { font-size: 4.3cqw; font-weight: 600; color: #111; margin-top: 1.5cqw; }
.pc-google b { font-weight: 600; }
.pc-google b:nth-child(1), .pc-google b:nth-child(4) { color: #4285F4; }
.pc-google b:nth-child(2), .pc-google b:nth-child(6) { color: #EA4335; }
.pc-google b:nth-child(3) { color: #FBBC05; }
.pc-google b:nth-child(5) { color: #34A853; }
.pc-stars { color: #EF9F27; font-size: 5cqw; letter-spacing: 0.25em; line-height: 1; }
.pc-how { font-size: 3.1cqw; line-height: 1.45; color: #444; max-width: 80cqw; }
.pc-foot { margin-top: auto; display: inline-flex; align-items: center; gap: 1.6cqw; font-size: 2.9cqw; color: #8a8580; }
.pc-foot img { width: 4.2cqw; height: 4.2cqw; }

/* The old small code box is gone. */
.qr-box { display: none; }
