/* Brand tokens — imported verbatim from brand/02_colors/colors.css. Do not
   hand-type hex values elsewhere in this file; reference the variables. */
:root {
  --brand-primary: #F84600;
  --brand-orange-50: #FFF0DB;
  --brand-orange-100: #FFA940;
  --brand-orange-200: #F97300;
  --brand-orange-300: #E25C00;
  --brand-orange-400: #F84600;
  --brand-orange-500: #C63A00;
  --brand-orange-600: #8F2A00;
  --brand-background: #FFFFFF;
  --brand-text: #151515;
  --brand-black: #050505;
}

@font-face {
  font-family: "Google Sans";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/GoogleSans-VariableFont_GRAD,opsz,wght.ttf") format("truetype-variations");
}

@font-face {
  font-family: "Google Sans";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/GoogleSans-Italic-VariableFont_GRAD,opsz,wght.ttf") format("truetype-variations");
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--brand-background);
  color: var(--brand-text);
  font-family: "Google Sans", Inter, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}



a {
  color: var(--brand-primary);
  text-decoration: none;
}
a:hover, a:focus { text-decoration: underline; }

header.site {
  max-width: 68ch;
  margin: 0 auto;
  padding: 1.5rem 1rem 0.5rem;
}
header.site a.logo { display: inline-block; }
header.site img.wordmark { height: 28px; width: auto; display: block; }

main {
  max-width: 68ch;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--brand-text);
}
h1 { font-size: 2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.4rem; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.4rem; }

p { margin: 0 0 1rem; }

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
code {
  background: var(--brand-orange-50);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}
pre {
  background: #f6f6f6;
  border: 1px solid #ececec;
  padding: 0.9rem 1rem;
  border-radius: 6px;
  overflow-x: auto;
}
pre code { background: transparent; padding: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid #e6e6e6;
}
th { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid #ececec;
  margin: 2rem 0;
}

.hero {
  margin: 0 0 2rem;
}
.hero .tagline {
  font-size: 1.05rem;
  color: #444;
  margin: 0.5rem 0 0;
}

.post-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid #ececec; }
.post-list li:last-child { border-bottom: 0; }
.post-list .meta { color: #666; font-size: 0.9rem; }
.post-list h2 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.post-list p { margin: 0.25rem 0 0; }

.featured {
  border: 1px solid #ececec;
  border-radius: 4px;
  padding: 1.25rem 1.25rem 1rem;
  margin: 0 0 2rem;
  background: #fff;
}
.featured .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--brand-primary);
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.featured h2 { margin: 0 0 0.4rem; }
.featured p { margin: 0; color: #333; }

.tags { margin: 0.5rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li a {
  display: inline-block;
  background: var(--brand-orange-50);
  color: var(--brand-primary);
  font-size: 0.8rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--brand-orange-100);
}
.tags li a:hover { text-decoration: none; background: var(--brand-primary); color: #fff; }

time { color: #666; font-size: 0.9rem; }

footer.site {
  border-top: 1px solid #ececec;
  margin-top: 3rem;
  padding: 1.25rem 1rem 2rem;
  font-size: 0.9rem;
  color: #555;
}
footer.site .wrap {
  max-width: 68ch;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
footer.site .links a { margin-right: 0.85rem; }
footer.site img.icon { height: 18px; width: auto; vertical-align: -3px; margin-right: 0.4rem; }

article header h1 { margin-top: 0.25rem; }
article .post-meta { color: #666; font-size: 0.9rem; margin-bottom: 1.5rem; }

/* X article graphics on blog cards: keep the same wide 5:2 rhythm as X. */
.featured {
  overflow: hidden;
  padding: 0;
}
.featured-body {
  padding: 1.25rem 1.25rem 1rem;
}
.featured-image,
.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 5 / 2;
  overflow: hidden;
  background: var(--brand-orange-50);
}
.featured-image img,
.card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-image:hover,
.card-image:hover { text-decoration: none; }
.post-list li.post-card {
  padding: 1.25rem 0;
}
.post-card .card-image {
  border: 1px solid #ececec;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}
.post-card-body h2 { margin-top: 0; }
article > p:first-of-type img {
  width: 100%;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ececec;
}

/* Top navigation (sticky, brand tokens only) */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--brand-background);
  border-bottom: 1px solid #ececec;
  height: 52px;
}
.topnav .wrap {
  max-width: 68ch;
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.topnav .brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.topnav .brand img {
  height: 20px;
  width: auto;
  display: block;
}
.topnav .nav-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.topnav .nav-actions svg.icon {
  width: 20px;
  height: 20px;
  display: block;
  color: var(--brand-text);
  transition: color 0.15s ease;
}
.topnav .nav-actions a:hover svg.icon,
.topnav .nav-actions a:focus svg.icon {
  color: var(--brand-primary);
}
.topnav .nav-actions a:hover,
.topnav .nav-actions a:focus {
  text-decoration: none;
}
.topnav .cta {
  background: var(--brand-primary);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
  white-space: nowrap;
}
.topnav .cta:hover,
.topnav .cta:focus {
  background: var(--brand-orange-500);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 520px) {
  .topnav .nav-actions { gap: 0.6rem; }
  .topnav .cta { font-size: 0.85rem; padding: 0.3rem 0.7rem; }
}

/* Article action rows, CTA card, prev/next (post pages) */
.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #555;
  margin: 0.25rem 0 1.25rem;
  font-size: 0.95rem;
}
.post-actions.compact {
  margin: 2rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid #ececec;
  font-size: 0.9rem;
}
.post-actions .back,
.post-actions .act {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #555;
  background: none;
  border: none;
  padding: 0.2rem 0.1rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}
.post-actions .acts-right {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.post-actions svg.icon {
  width: 18px;
  height: 18px;
  display: block;
  color: #555;
  transition: color 0.15s ease;
}
.post-actions a.act:hover,
.post-actions a.act:focus,
.post-actions button.act:hover,
.post-actions button.act:focus,
.post-actions .back:hover,
.post-actions .back:focus {
  color: var(--brand-primary);
  text-decoration: none;
}
.post-actions a.act:hover svg.icon,
.post-actions a.act:focus svg.icon,
.post-actions button.act:hover svg.icon,
.post-actions button.act:focus svg.icon,
.post-actions .back:hover svg.icon,
.post-actions .back:focus svg.icon {
  color: var(--brand-primary);
}

.agent-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--brand-background);
  border: 1px solid #dedede;
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
  margin-top: 2rem;
}
.agent-cta-body { flex: 1 1 auto; }
.agent-cta h2 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
  color: var(--brand-text);
}
.agent-cta p { margin: 0; color: #555; font-size: 0.95rem; }
.agent-cta .cta {
  flex: 0 0 auto;
  background: var(--brand-primary);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.agent-cta .cta:hover,
.agent-cta .cta:focus {
  background: var(--brand-orange-500);
  color: #fff;
  text-decoration: none;
}

.prevnext {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  flex-wrap: wrap;
}
.prevnext a { color: var(--brand-primary); max-width: 48%; }
.prevnext a:hover { text-decoration: underline; }
.prevnext .next { margin-left: auto; text-align: right; }

/* Tags are kept in metadata/API for later, but hidden from the UI for now. */
.tags,
.tag-block {
  display: none;
}

/* Topnav copy button (replaces the RSS icon in the primary nav). */
.topnav .nav-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
  color: var(--brand-text);
  cursor: pointer;
}
.topnav .nav-copy:hover,
.topnav .nav-copy:focus {
  color: var(--brand-primary);
}
.topnav .nav-copy span {
  font-size: 0.9rem;
  line-height: 1;
}

/* Icon-only copy buttons: hide empty label spans so flex gap collapses. */
.nav-copy span:empty,
.post-actions .act span:empty {
  display: none;
}

/* Orange brand icon next to the wordmark in the topnav. */
.topnav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.topnav .brand .brand-icon {
  height: 22px;
  width: auto;
}

/* --- Mobile / responsiveness fixes --- */

/* Images never exceed their container (in-body article images are up to
   1200px natural width; without this they spill on phones). Specific
   rules (.topnav .brand img, nav icons) still override height. */
img {
  max-width: 100%;
  height: auto;
}

/* In-body article images: full column width, subtle rounding. */
article img {
  border-radius: 6px;
}

/* Long URLs / long unbroken words in article text shouldn't force
   horizontal scroll. */
article {
  overflow-wrap: break-word;
}
code {
  overflow-wrap: break-word;
}

/* Wide markdown tables scroll inside their own box instead of pushing
   the page wider. */
article table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Slightly tighter type and spacing on small screens. */
@media (max-width: 520px) {
  .featured-body { padding: 1rem 1rem 0.85rem; }
  .agent-cta { flex-direction: column; align-items: flex-start; }
  .prevnext { flex-wrap: wrap; gap: 0.5rem; }
  .prevnext a { max-width: 100%; }
  .prevnext .next { margin-left: 0; text-align: left; }
}

/* ── Article hero image ─────────────────────────────────────────────── */
.post-hero {
  width: 100%;
  margin: 0 0 2rem;
  border-radius: 10px;
  overflow: hidden;
  line-height: 0;
}
.post-hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}
