/* grumpytechbro.com — shared chrome */
:root {
  --ink: #1a1a1a;
  --muted: #5b6470;
  --line: #e5e7eb;
  --paper: #faf9f7;
  --card: #ffffff;
  --accent: #0b57d0;
  --accent-soft: #e8f0fe;
  --nav-bg: #111827;
  --nav-fg: #f3f4f6;
  --nav-muted: #9ca3af;
  --ok: #166534;
  --warn: #9a3412;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.gtb-page {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
}

/* —— site nav (injected into report pages + used on landings) —— */
nav.gtb-site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1rem;
  padding: 0.55rem 1rem;
  background: var(--nav-bg);
  color: var(--nav-fg);
  font-size: 0.9rem;
  border-bottom: 1px solid #000;
}

nav.gtb-site-nav a {
  color: var(--nav-fg);
  text-decoration: none;
  font-weight: 600;
}

nav.gtb-site-nav a:hover { text-decoration: underline; color: #fff; }

nav.gtb-site-nav .gtb-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-right: 0.5rem;
  color: #fff;
}

nav.gtb-site-nav .gtb-pfp,
.gtb-pfp {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  vertical-align: middle;
}

.gtb-pfp-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.gtb-hero-identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.15rem;
}

.gtb-hero-identity h1 { margin: 0.15rem 0 0; }

/* markdown-rendered prose */
.gtb-prose h2 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
  letter-spacing: -0.01em;
}
.gtb-prose h3 {
  font-size: 1.02rem;
  margin: 1.25rem 0 0.4rem;
}
.gtb-prose p { margin: 0 0 0.85rem; }
.gtb-prose ul, .gtb-prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.gtb-prose li { margin: 0.25rem 0; }
.gtb-prose a { color: var(--accent); font-weight: 600; }
.gtb-prose strong { font-weight: 700; }
.gtb-prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.5rem 0;
}
.gtb-prose pre {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: #111827;
  color: #e5e7eb;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.gtb-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
.gtb-prose :not(pre) > code {
  background: #eef2ff;
  color: #1e3a8a;
  padding: 0.08em 0.35em;
  border-radius: 4px;
}
.gtb-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0 0 1.15rem;
  background: var(--card);
}
.gtb-prose th,
.gtb-prose td {
  border: 1px solid var(--line);
  padding: 0.4rem 0.55rem;
  text-align: left;
  vertical-align: top;
}
.gtb-prose thead th { background: #f3f4f6; }
.gtb-prose td[style*="text-align: right"],
.gtb-prose th[style*="text-align: right"] { font-variant-numeric: tabular-nums; }

/* App screenshot galleries */
.gtb-shots-heading {
  font-size: 1.05rem;
  margin: 0 0 0.75rem;
  color: var(--ink);
}
.gtb-shot-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr;
  margin: 0 0 0.5rem;
}
@media (min-width: 640px) {
  .gtb-shot-grid { grid-template-columns: repeat(3, 1fr); }
}
.gtb-shot {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.gtb-shot a { display: block; line-height: 0; }
.gtb-shot img {
  display: block;
  width: 100%;
  height: auto;
  background: #f1f5f9;
}
.gtb-shot figcaption {
  padding: 0.45rem 0.65rem 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  border-top: 1px solid var(--line);
}


nav.gtb-site-nav .gtb-sep {
  color: var(--nav-muted);
  font-weight: 400;
  user-select: none;
}

nav.gtb-site-nav .gtb-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  align-items: center;
}

nav.gtb-site-nav .gtb-x {
  flex: 1 1 auto;
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  color: #fff;
}

/* Report pages already set body margin — pull nav full-bleed */
body:not(.gtb-page) nav.gtb-site-nav {
  margin: -1.5rem -1.5rem 1.25rem -1.5rem;
  width: calc(100% + 3rem);
  max-width: none;
}

/* —— landing layout —— */
.gtb-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.gtb-wrap.wide { max-width: 980px; }

.gtb-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  margin: 0.5rem 0 0.35rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.gtb-tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
}

/* —— home hero with map preview —— */
.gtb-hero-band {
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(37, 99, 235, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(180, 83, 9, 0.2), transparent 50%),
    linear-gradient(165deg, #0b1220 0%, #111827 45%, #1e293b 100%);
  color: #f8fafc;
  padding: 2rem 1.25rem 2.5rem;
  border-bottom: 1px solid #0f172a;
}

.gtb-hero-band-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 860px) {
  .gtb-hero-band-inner {
    grid-template-columns: 1fr 1.15fr;
    gap: 2rem;
  }
}

.gtb-hero-band .gtb-badge {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
}

.gtb-hero-band h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  margin: 0.4rem 0 0.5rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

.gtb-hero-band .gtb-tagline {
  color: #cbd5e1;
  font-size: 1.08rem;
  margin: 0 0 1.25rem;
  max-width: 32rem;
}

.gtb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0;
}

.gtb-btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
}

.gtb-btn.primary {
  background: #3b82f6;
  color: #fff;
}

.gtb-btn.primary:hover { background: #2563eb; }

.gtb-btn.ghost {
  background: transparent;
  color: #e2e8f0;
  border-color: #475569;
}

.gtb-btn.ghost:hover {
  border-color: #94a3b8;
  color: #fff;
}

.gtb-hero-shot {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  text-decoration: none;
  background: #0f172a;
}

.gtb-hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.gtb-hero-shot-cap {
  display: block;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.gtb-section > .gtb-feature-card + .gtb-feature-card {
  margin-top: 1rem;
}

.gtb-feature-card {
  display: grid;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (min-width: 720px) {
  .gtb-feature-card {
    grid-template-columns: 1.1fr 1fr;
    align-items: stretch;
  }
}

.gtb-feature-copy {
  padding: 1.25rem 1.35rem 1.4rem;
}

.gtb-feature-copy h2 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  color: var(--accent);
}

.gtb-feature-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.gtb-feature-copy .gtb-cta { margin-top: 0.9rem; }

.gtb-feature-shots {
  min-height: 160px;
  background: #0f172a;
}

.gtb-feature-shots img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 180px;
}

.gtb-org-preview {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(139, 16, 40, 0.35), transparent 55%),
    #14080a;
}

.gtb-org-preview p {
  margin: 0;
  color: #f3e8ea;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.gtb-org-preview p:nth-child(n+4) { color: #c4a4aa; }
.gtb-org-preview p:nth-child(n+5) { color: #8a6a70; }

.gtb-card-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .gtb-card-grid.apps { grid-template-columns: 1fr; }
  .gtb-card-grid.apps.three { grid-template-columns: repeat(3, 1fr); }
  .gtb-card-grid.home { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .gtb-card-grid.apps.three { grid-template-columns: 1fr; }
}

.gtb-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.gtb-card:hover,
.gtb-article-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 4px 14px rgba(11, 87, 208, 0.08);
}

.gtb-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  color: var(--accent);
}

.gtb-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}
.gtb-card-top h2 { margin: 0; }
.gtb-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.gtb-app-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.gtb-app-header h1 { margin: 0.15rem 0 0.35rem; }
.gtb-app-header .gtb-tagline { margin-bottom: 0; }
.gtb-app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
@media (max-width: 520px) {
  .gtb-app-icon { width: 72px; height: 72px; border-radius: 16px; }
}


.gtb-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gtb-card .gtb-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent);
}

.gtb-section-lead {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.02rem;
  max-width: 46rem;
}

.gtb-section-more {
  margin: 0.85rem 0 0;
}

.gtb-section-more .gtb-cta {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.gtb-section-more .gtb-cta:hover { text-decoration: underline; }

.gtb-article-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .gtb-article-grid { grid-template-columns: 1fr 1fr; }
  .gtb-article-grid.half > :first-child {
    grid-column: auto;
    display: block;
  }
  .gtb-article-grid > :first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    align-items: stretch;
  }
  .gtb-article-grid > :first-child .gtb-article-cover {
    height: 100%;
  }
  .gtb-article-grid > :first-child .gtb-article-cover img {
    height: 100%;
    aspect-ratio: auto;
    min-height: 180px;
  }
  .gtb-article-grid.half > :first-child .gtb-article-cover {
    height: auto;
  }
  .gtb-article-grid.half > :first-child .gtb-article-cover img {
    height: auto;
    min-height: 0;
    aspect-ratio: 5 / 2;
    object-fit: contain;
  }
}

.gtb-article-card {
  padding: 0;
  overflow: hidden;
}

.gtb-article-card .gtb-article-cover {
  display: block;
  line-height: 0;
  background: #0f172a;
}

.gtb-article-card .gtb-article-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  object-fit: cover;
}

.gtb-article-body {
  display: block;
  padding: 0.9rem 1.05rem 1.05rem;
}

.gtb-article-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.08rem;
}

.gtb-article-card h2 a {
  color: inherit;
  text-decoration: none;
}

.gtb-article-card h2 a:hover { text-decoration: underline; }

a.gtb-article-cover {
  color: inherit;
  text-decoration: none;
}

.gtb-article-date {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.gtb-article-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.gtb-article-card .gtb-cta { margin-top: 0.65rem; }

.gtb-article-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 1.15rem;
  margin-top: 0.65rem;
}

.gtb-article-ctas .gtb-cta { margin-top: 0; }

.gtb-section {
  margin: 2.25rem 0 1rem;
}

.gtb-section h2 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.gtb-prose p { margin: 0 0 1rem; color: var(--ink); }
.gtb-prose ul { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--ink); }
.gtb-prose li { margin: 0.3rem 0; }

.gtb-meta {
  font-size: 0.88rem;
  color: var(--muted);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.gtb-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* —— fun master index —— */
.gtb-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--card);
  margin: 0.75rem 0 1.5rem;
}

.gtb-matrix th,
.gtb-matrix td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
}

.gtb-matrix thead th { background: #f3f4f6; }
.gtb-matrix tbody th { background: #fafafa; width: 9rem; }
.gtb-matrix a { color: var(--accent); font-weight: 600; text-decoration: none; }
.gtb-matrix a:hover { text-decoration: underline; }
.gtb-matrix .miss { color: #9ca3af; text-align: center; }
.gtb-matrix .sub {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.15rem;
}

/* —— /orgs/ picker + takes —— */
.gtb-meta-line {
  font-size: 0.88rem;
  margin: 0 0 0.85rem;
}

.gtb-meta-line a { color: var(--accent); font-weight: 600; text-decoration: none; }
.gtb-meta-line a:hover { text-decoration: underline; }

.gtb-org-count {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

nav.gtb-org-picker {
  background: var(--paper);
  padding: 0.55rem 0 0.75rem;
  border-bottom: 1px solid var(--line);
  margin: 0 0 0.5rem;
}

.gtb-org-tools {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.35rem 0;
}

.gtb-org-tools input[type=search] {
  flex: 1 1 12rem;
  font: inherit;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 6px;
}

.gtb-org-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0 0 0.55rem;
}

.gtb-org-regions button {
  font: inherit;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  border-radius: 999px;
}

.gtb-org-regions button[aria-pressed="true"] {
  background: var(--nav-bg);
  color: var(--nav-fg);
  border-color: var(--nav-bg);
}

ul.gtb-org-names {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  max-height: 6.5rem;
  overflow: auto;
}

ul.gtb-org-names li[hidden] { display: none; }

ul.gtb-org-names a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--accent);
}

ul.gtb-org-names a[aria-current="true"] {
  font-weight: 700;
  text-decoration: underline;
}

.gtb-org-stage { min-height: 12rem; }

article.gtb-org-quote {
  display: none;
  padding: 1.1rem 0 0.4rem;
  scroll-margin-top: 4rem;
}

article.gtb-org-quote.is-on,
article.gtb-org-quote:target { display: block; }

article.gtb-org-quote h2 {
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  text-transform: none;
  letter-spacing: -0.02em;
}

article.gtb-org-quote h2 a {
  color: var(--ink);
  text-decoration: none;
}

article.gtb-org-quote h2 a:hover { color: var(--accent); }

.gtb-org-meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.gtb-org-obs ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }

article.gtb-org-quote .gtb-cta {
  display: inline-block;
  margin-top: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

article.gtb-org-quote .gtb-cta:hover { text-decoration: underline; }

article.gtb-take h1 { font-size: 1.15rem; }
article.gtb-take h2,
article.gtb-take h3 {
  font-size: 1.05rem;
  margin-top: 1.4rem;
}

sup.cite { font-size: 0.7em; }
sup.cite a { font-weight: 600; text-decoration: none; }
sup.cite a:hover { text-decoration: underline; }

.gtb-story-header {
  display: block;
  margin: 0 0 1.25rem;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111827;
  line-height: 0;
}

.gtb-story-header img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  object-fit: contain;
}

.gtb-sankey-plate {
  display: block;
  margin: 1.25rem auto;
  width: fit-content;
  max-width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.gtb-sankey-plate img {
  display: block;
  margin: 0 auto;
  width: auto;
  max-width: 100%;
  max-height: 800px;
  height: auto;
  background: #fff;
}

.gtb-sankey-plate figcaption {
  padding: 0.45rem 0.65rem 0.55rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  text-align: center;
  border-top: 1px solid var(--line);
}

.gtb-sankey-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.15rem 0 1.35rem;
}

.gtb-sankey-figure {
  margin: 0;
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.gtb-sankey-figure svg.gtb-sankey {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: min(72vh, 720px);
  background: #fff;
}

.gtb-sankey-figure svg.gtb-sankey a {
  cursor: pointer;
}

.gtb-sankey-list-lead {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}

.gtb-sankey-orgs-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 2rem;
}

.gtb-sankey-orgs {
  flex: 1 1 16rem;
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

.gtb-sankey-orgs li { margin: 0.15rem 0; }

.gtb-sankey-orgs a { color: var(--accent); font-weight: 600; }
