/* tgpub blog: matches tgpub.app (molten gold on marble, or on obsidian in dark).
   Tokens are copied from tg-publisher web/app/globals.css. tgpub.app is a
   Next.js build with hashed CSS, so the chrome below mirrors its Tailwind
   classes value for value instead of linking the site's stylesheet. */

/* Fonts: the same Roboto and Sometype Mono files tgpub.app self-hosts through
   next/font (latin + latin-ext), so text metrics match the site exactly. The
   400/500/700 Roboto faces share one variable file, as on the site. */
@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-stretch:100%;font-display:swap;src:url(fonts/roboto-latin-ext.woff2) format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Roboto;font-style:normal;font-weight:400;font-stretch:100%;font-display:swap;src:url(fonts/roboto-latin.woff2) format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-stretch:100%;font-display:swap;src:url(fonts/roboto-latin-ext.woff2) format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Roboto;font-style:normal;font-weight:500;font-stretch:100%;font-display:swap;src:url(fonts/roboto-latin.woff2) format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Roboto;font-style:normal;font-weight:700;font-stretch:100%;font-display:swap;src:url(fonts/roboto-latin-ext.woff2) format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:Roboto;font-style:normal;font-weight:700;font-stretch:100%;font-display:swap;src:url(fonts/roboto-latin.woff2) format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Sometype Mono";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/sometype-mono-latin-ext.woff2) format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Sometype Mono";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/sometype-mono-latin.woff2) format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Sometype Mono";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/sometype-mono-latin-ext.woff2) format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Sometype Mono";font-style:normal;font-weight:500;font-display:swap;src:url(fonts/sometype-mono-latin.woff2) format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  /* Light is the default; dark is html[data-theme="dark"], set before first
     paint by the inline script in layout.html (same as tgpub.app). */
  color-scheme: light;
  --c-bg: #faf8f4;
  --c-bg-tint: #f4f1ea;
  --c-surface: #ffffff;
  --c-surface-2: #f4f1ea;
  --c-surface-hover: #f7f4ee;
  --c-border: #ebe6db;
  --c-border-strong: #dcd5c6;
  --c-text: #1b1408;
  --c-text-2: #5f584c;
  --c-text-3: #7d7566;
  --c-primary: #e07000;
  --c-primary-hover: #c76200;
  --c-primary-tint: rgba(247, 148, 29, 0.12);
  --c-on-primary: #241a06;
  --c-bar-bg: rgba(250, 248, 244, 0.82);
  --shadow-card: 0 1px 2px rgba(56, 44, 16, 0.05), 0 1px 3px rgba(56, 44, 16, 0.04);
  --shadow-pop: 0 22px 48px rgba(56, 44, 16, 0.1), 0 8px 18px rgba(56, 44, 16, 0.05);
  --brand-gradient: linear-gradient(120deg, #ffd071 0%, #ffb020 52%, #f7941d 100%);
  --bolt-glow: 0 8px 30px -8px rgba(255, 176, 32, 0.55);
  --brand-gradient-text: linear-gradient(120deg, #f7941d 0%, #e07000 55%, #c45800 100%);
  --engrave: linear-gradient(90deg, transparent, rgba(255, 176, 32, 0.38), transparent);
  --font-sans: "Roboto", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Sometype Mono", ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, monospace;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  /* sf-wrap gutters */
  --tp-gutter: clamp(20px, 4vw, 84px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --c-bg: #0a0908;
  --c-bg-tint: #131110;
  --c-surface: #1c1915;
  --c-surface-2: #151310;
  --c-surface-hover: #26221b;
  --c-border: #322c22;
  --c-border-strong: #4a4235;
  --c-text: #f7f2e8;
  --c-text-2: #cbc3b2;
  --c-text-3: #97907f;
  --c-primary: #ffb020;
  --c-primary-hover: #ffc65c;
  --c-primary-tint: rgba(255, 176, 32, 0.13);
  --c-on-primary: #241a06;
  --c-bar-bg: rgba(11, 10, 8, 0.82);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 20px 48px rgba(0, 0, 0, 0.62);
  --brand-gradient: linear-gradient(120deg, #ffb020 0%, #f7941d 55%, #f26b0f 100%);
  --bolt-glow: 0 6px 22px -8px rgba(242, 122, 15, 0.65);
  --brand-gradient-text: linear-gradient(120deg, #ffb020 0%, #f7941d 55%, #f26b0f 100%);
  --engrave: linear-gradient(90deg, transparent, rgba(224, 112, 0, 0.3), transparent);
}

/* ------------------------------------------------------------- base --- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x and the wrap/min-width rules are tgpub.app's own base rules. */
html { -webkit-text-size-adjust: 100%; line-height: 1.5; overflow-x: hidden; }
h1, h2, h3, p, li, dt, dd { overflow-wrap: break-word; }
pre, table { max-width: 100%; min-width: 0; }
body.tp {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6; /* tgpub.app's body value, so the chrome matches */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: inherit; }
img { max-width: 100%; height: auto; }
::selection { background: var(--c-primary-tint); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: 6px;
}
.bl-main { flex: 1; min-height: 50vh; }

/* Tailwind preflight, scoped to the copied chrome. */
.sf-nav *, .tp-footer *, .tp-hero * { margin: 0; padding: 0; }
.sf-nav, .sf-nav *, .tp-footer, .tp-footer * { border: 0 solid; }
.sf-nav svg, .tp-footer svg { display: block; vertical-align: middle; }
.tp-footer ul { list-style: none; }

/* ---------------------------------------------------- shared pieces --- */
.tp-wrap {
  width: 100%;
  max-width: 1760px;
  margin-inline: auto;
  padding-inline: var(--tp-gutter);
}
.tp-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-text-3);
}
.tp-engrave { height: 1px; background: var(--engrave); border: 0; color: inherit; }

.tp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 999px;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.2s ease;
  white-space: nowrap;
}
body.tp .tp-btn-primary { background-image: var(--brand-gradient); color: var(--c-on-primary); font-weight: 650; box-shadow: var(--bolt-glow); }
body.tp .tp-btn-secondary { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); }
.tp-btn-sm { padding: 0.4rem 0.85rem; font-size: 0.8125rem; }

/* Brand: gold coin with a double chevron, two-tone uppercase wordmark. */
.tp-brand { display: inline-flex; align-items: center; }
.tp-seal {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: calc(infinity * 1px);
  background-image: var(--brand-gradient);
  box-shadow: var(--bolt-glow), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #14120e;
}
.tp-seal svg { width: 15px; height: 15px; }
.tp-seal-sm { width: 26px; height: 26px; }
.tp-seal-sm svg { width: 13px; height: 13px; }
.tp-word-tg { color: var(--c-text); }
.tp-word-pub { background: var(--brand-gradient-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ----------------------------------------------------------- header ---
   Verbatim copy of the .sf-nav block in tg-publisher web/app/globals.css
   (f36e554). To re-sync, paste the site's block over this one. */
.sf-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bar-bg);
  backdrop-filter: blur(16px) saturate(140%);
  transition:
    box-shadow 0.25s ease,
    background-color 0.25s ease;

  --nav-line: rgba(224, 112, 0, 0.32);
  --nav-shadow: 0 14px 30px -20px rgba(56, 44, 16, 0.45);
}

html[data-theme="dark"] .sf-nav {
  --nav-line: rgba(255, 176, 32, 0.42);
  --nav-shadow: 0 14px 34px -20px rgba(0, 0, 0, 0.9);
}

/* The hairline. Gold where the logo is, neutral across the middle, gone at
   both edges, so the bar sits on the page instead of being boxed off it. */
.sf-nav::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--nav-line) 14%,
    var(--c-border) 46%,
    var(--c-border) 80%,
    transparent 100%
  );
}

/* Only once the page has moved. A bar that is shadowed at rest looks like a
   floating card; shadowed on scroll it looks like it lifted off the page. */
.sf-nav[data-scrolled="1"] {
  box-shadow: var(--nav-shadow);
}

.sf-nav-in {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 66px;
  max-width: 2000px;
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 84px);
}

/* ---------------------------------------------------------------- logo -- */

.sf-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--c-text);
  text-decoration: none;
}

.sf-logo-txt {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1;
}

/* The seal tips as you reach for it. Small, but it is the difference
   between a logo and a button that happens to be a logo. */
.sf-logo-mark {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.sf-logo:hover .sf-logo-mark {
  transform: translateY(-1px) rotate(-4deg);
}

/* ----------------------------------------------------------- nav links -- */

.sf-nav-links {
  display: flex;
  gap: 4px;
  margin-inline-start: 4px;
  flex-shrink: 0;
}

.sf-nav-links a {
  font-size: 15px;
  font-weight: 550;
  color: var(--c-text-2);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.sf-nav-links a:hover {
  color: var(--c-text);
  background: var(--c-surface-hover);
}

.sf-nav-links a[aria-current="page"] {
  color: var(--c-primary);
  background: var(--c-primary-tint);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(224, 112, 0, 0.2);
}

html[data-theme="dark"] .sf-nav-links a[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.22);
}

/* --------------------------------------------------------- right group -- */

.sf-nav-right {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Nothing in the bar is allowed to squeeze. A link that shrinks instead of
   overflowing looks fine to the measurement in NavFit and clipped to the
   reader, so the ladder would never step down and the bar would silently
   crush itself. */
.sf-nav-right > * {
  flex-shrink: 0;
}

/* Secondary links are a step down from the products, not equals: smaller,
   same pill behaviour. The products are what the site sells. */
.sf-nav-sec {
  font-size: 14px;
  font-weight: 550;
  color: var(--c-text-2);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.sf-nav-sec:hover {
  color: var(--c-text);
  background: var(--c-surface-hover);
}

.sf-nav-sec[aria-current="page"] {
  color: var(--c-primary);
  background: var(--c-primary-tint);
  font-weight: 650;
}

.sf-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition:
    color 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease;
}

.sf-icon-btn:hover {
  background: var(--c-surface-hover);
  color: var(--c-text);
}

.sf-icon-btn svg {
  width: 18px;
  height: 18px;
}

/* A thumb is not a mouse pointer. */
@media (pointer: coarse) {
  .sf-icon-btn {
    width: 44px;
    height: 44px;
  }
}

/* -------------------------------------------------------------- burger -- */

.sf-burger {
  display: none;
}

.sf-burger-box {
  position: relative;
  display: block;
  width: 18px;
  height: 12px;
}

.sf-burger-box > span {
  position: absolute;
  inset-inline-start: 0;
  width: 100%;
  height: 1.8px;
  border-radius: 2px;
  background: currentcolor;
  transition:
    transform 0.22s ease,
    opacity 0.15s ease,
    top 0.22s ease;
}

.sf-burger-box > span:nth-child(1) { top: 0; }
.sf-burger-box > span:nth-child(2) { top: 5px; width: 70%; }
.sf-burger-box > span:nth-child(3) { top: 10px; }

.sf-burger:hover .sf-burger-box > span:nth-child(2) { width: 100%; }

.sf-burger[aria-expanded="true"] {
  color: var(--c-primary);
  border-color: rgba(224, 112, 0, 0.45);
  background: var(--c-primary-tint);
}

.sf-burger[aria-expanded="true"] .sf-burger-box > span:nth-child(1) {
  top: 5px;
  transform: rotate(45deg);
}

.sf-burger[aria-expanded="true"] .sf-burger-box > span:nth-child(2) {
  opacity: 0;
}

.sf-burger[aria-expanded="true"] .sf-burger-box > span:nth-child(3) {
  top: 5px;
  transform: rotate(-45deg);
}

/* ------------------------------------------------------- the fit ladder --
   Each stage gives up the least valuable thing still on the bar. NavFit
   picks the first one that fits; the media query below is the floor for a
   phone and for a visitor with JavaScript off, so the bar is never broken
   while waiting for a measurement. */

.nl-s { display: none; }

.sf-nav[data-fit="short"] .nl-s,
.sf-nav[data-fit="nosec"] .nl-s {
  display: inline;
}

.sf-nav[data-fit="short"] .nl-f,
.sf-nav[data-fit="nosec"] .nl-f {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.sf-nav[data-fit="short"] .sf-nav-in,
.sf-nav[data-fit="nosec"] .sf-nav-in { gap: 16px; }

.sf-nav[data-fit="short"] .sf-nav-links,
.sf-nav[data-fit="nosec"] .sf-nav-links { gap: 2px; margin-inline-start: 0; }

.sf-nav[data-fit="short"] .sf-nav-links a,
.sf-nav[data-fit="nosec"] .sf-nav-links a { padding-inline: 11px; }

.sf-nav[data-fit="nosec"] .sf-nav-sec,
.sf-nav[data-fit="burger"] .sf-nav-sec,
.sf-nav[data-fit="mini"] .sf-nav-sec,
.sf-nav[data-fit="burger"] .sf-nav-links,
.sf-nav[data-fit="mini"] .sf-nav-links {
  display: none;
}

.sf-nav[data-fit="burger"] .sf-nav-in,
.sf-nav[data-fit="mini"] .sf-nav-in { gap: 12px; }

.sf-nav[data-fit="burger"] .sf-nav-right,
.sf-nav[data-fit="mini"] .sf-nav-right { gap: 8px; }

.sf-nav[data-fit="nosec"] .sf-burger,
.sf-nav[data-fit="burger"] .sf-burger,
.sf-nav[data-fit="mini"] .sf-burger {
  display: inline-flex;
}

/* Below this the wordmark goes and the seal carries the brand alone. */
.sf-nav[data-fit="mini"] .sf-logo-txt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* The fallback, for the frame before NavFit measures and for a visitor whose
   JavaScript never runs. Scoped to :not([data-measured]) so that the moment a
   real measurement exists it wins: a media query that kept applying would
   drop product links at 1000px that measurably still fit, which is the whole
   failure mode the ladder exists to avoid. */

@media (max-width: 1240px) {
  .sf-nav:not([data-measured]) .nl-f {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .sf-nav:not([data-measured]) .nl-s {
    display: inline;
  }
}

@media (max-width: 1040px) {
  .sf-nav:not([data-measured]) .sf-nav-links,
  .sf-nav:not([data-measured]) .sf-nav-sec {
    display: none;
  }

  .sf-nav:not([data-measured]) .sf-burger {
    display: inline-flex;
  }

  .sf-nav:not([data-measured]) .sf-nav-in {
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-burger-box > span,
  .sf-logo-mark {
    transition: none;
  }
}
/* ---- end of the site's .sf-nav block ---- */

.sf-icon-btn { font: inherit; }
/* The icon names the theme you would switch to: a sun in dark, a moon in light. */
.tp-theme .tp-ico-sun, html[data-theme="dark"] .tp-theme .tp-ico-moon { display: none; }
html[data-theme="dark"] .tp-theme .tp-ico-sun { display: block; }

/* The small-screen sheet, value for value from MobileNav.tsx. */
.tp-sheet-backdrop { position: fixed; inset: 0; top: 66px; z-index: 40; background-color: rgba(0, 0, 0, 0.5); }
.tp-sheet {
  position: fixed;
  inset-inline: 0;
  top: 66px;
  z-index: 50;
  max-height: calc(100vh - 66px);
  overflow-y: auto;
  border-bottom-width: 1px;
  border-color: var(--c-border);
  background-color: var(--c-surface);
  padding: 1rem;
}
.tp-sheet[hidden], .tp-sheet-backdrop[hidden] { display: none; }
.tp-sheet .tp-sheet-h { padding: 0 0.75rem 0.25rem; }
.tp-sheet > a:not(.tp-btn) {
  display: block;
  border-radius: 11px;
  padding: 0.625rem 0.75rem;
  color: var(--c-text-2);
}
.tp-sheet > a:not(.tp-btn):hover { background-color: var(--c-surface-hover); color: var(--c-text); }
.tp-sheet .tp-sheet-rule { margin-block: 0.75rem; }
.tp-sheet .tp-sheet-cta { margin-top: 1rem; width: 100%; }

/* ----------------------------------------------------------- footer --- */
.tp-footer { margin-top: 5rem; border-top-width: 1px; border-color: var(--c-border); padding-block: 3rem; }
.tp-footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.tp-footer .tp-footer-tag {
  margin-top: 0.75rem;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: calc(1.25 / 0.875);
  color: var(--c-text-3);
}
.tp-footer-cols { display: flex; gap: 3rem; font-size: 0.875rem; line-height: calc(1.25 / 0.875); }
.tp-footer .tp-footer-h { margin-bottom: 0.75rem; }
.tp-footer-list > li:not(:last-child) { margin-bottom: 0.375rem; }
.tp-footer-list a { color: var(--c-text-2); }
.tp-footer-list a:hover { color: var(--c-text); }
.tp-footer .tp-footer-rule { margin-block: 2rem; }
.tp-footer-base { font-size: 0.75rem; line-height: calc(1 / 0.75); color: var(--c-text-3); }
/* The Google preferred source button, as tgpub's own small secondary button. */
.tp-footer .tp-footer-pref { margin-top: 1rem; }
body.tp .gps-btn {
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: calc(1.25 / 0.875);
  opacity: 1;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
body.tp .gps-btn:hover { background: var(--c-surface-hover); border-color: var(--c-border-strong); }
body.tp .gps-card {
  margin: 2rem 0 0;
  padding: 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--c-surface);
  box-shadow: var(--shadow-card);
  opacity: 1;
}
body.tp .gps-card h3 { color: var(--c-text); font-size: 1rem; font-weight: 500; }
body.tp .gps-card p { color: var(--c-text-2); font-size: 0.875rem; }

/* ------------------------------------------------------------- hero --- */
/* Same header block as the product pages: border, gold wash, eyebrow, display. */
.tp-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--c-border); }
.tp-storm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 72% 18%, var(--c-primary-tint) 0%, transparent 70%),
    radial-gradient(45% 40% at 10% 0%, rgba(255, 176, 32, 0.07) 0%, transparent 70%);
}
.tp-hero-inner { position: relative; z-index: 10; padding-block: 3.5rem; }
@media (min-width: 64rem) { .tp-hero-inner { padding-block: clamp(48px, 7vh, 96px); } }
.tp-hero-title {
  margin-top: 1.25rem !important;
  max-width: 18ch;
  font-size: clamp(2.125rem, 7.6vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--c-text);
}
.tp-hero-lede {
  margin-top: 1.25rem !important;
  max-width: 54ch;
  font-size: 17.5px;
  line-height: 1.55;
  color: var(--c-text-2);
}
.tp-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 30px !important; }

/* Articles carry long titles: display-2 scale, one step up. */
.tp-hero-post .tp-hero-title {
  max-width: 24ch;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.tp-crumbs { font-size: 0.8125rem; color: var(--c-text-3); margin-bottom: 1.25rem !important; }
.tp-crumbs a { color: var(--c-text-2); }
.tp-crumbs a:hover { color: var(--c-text); }
.tp-sep { opacity: 0.5; }
.tp-hero .tp-cat { margin-bottom: 0; }
.tp-art-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem !important;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--c-text-3);
}
.tp-art-meta > * + *::before { content: "·"; margin-inline-end: 0.5rem; opacity: 0.6; }
.tp-art-meta a { color: var(--c-text-2); }

/* ------------------------------------------------------------- feed --- */
.tp-feed { padding-block: 4rem 0; }
@media (min-width: 64rem) { .tp-feed { padding-top: 5rem; } }
.tp-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) { .tp-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .tp-cards { grid-template-columns: 1fr 1fr 1fr; } }
.tp-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
body.tp a.tp-card:hover { border-color: var(--c-border-strong); background: var(--c-surface-hover); }
.tp-card-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--c-border);
}
.tp-card-body { display: flex; flex-direction: column; flex: 1; padding: 1.5rem; }
.tp-cat {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-primary);
}
.tp-card-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--c-text);
  overflow-wrap: anywhere;
}
.tp-card-dek {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--c-text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tp-card-meta {
  margin: auto 0 0;
  padding-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--c-text-3);
}
.tp-empty-card { padding: 2rem; max-width: 40rem; }
.tp-empty-card h2 { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.tp-empty-card p { margin: 0 0 1.25rem; color: var(--c-text-2); }
.tp-empty-card .tp-btn { align-self: flex-start; } /* the card is a flex column; keep the button its own width */
.tp-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--c-border);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--c-text-3);
}
body.tp .tp-pager a { color: var(--c-primary); }
body.tp .tp-pager a:hover { color: var(--c-primary-hover); }

/* ---------------------------------------------------------- article --- */
.tp-article-grid { padding-top: 3rem; max-width: calc(46rem + 2 * var(--tp-gutter)); margin-inline: 0; }
.tp-hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--c-border);
  margin-bottom: 2rem;
}
.tp-updated { font-family: var(--font-mono); font-size: 0.75rem; color: var(--c-text-3); margin: 0 0 1.5rem; }
.tp-share-card {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--c-border);
  border-radius: 16px;
  background: var(--c-surface);
  font-size: 0.875rem;
  color: var(--c-text-3);
}
body.tp .tp-share-card a { font-weight: 500; color: var(--c-text); }
body.tp .tp-share-card a:hover { color: var(--c-primary); }
.tp-related { margin-top: 4rem; }
.tp-related h2 { margin: 0 0 1.75rem; }
.tp-related .tp-cards { grid-template-columns: 1fr; }
@media (min-width: 48rem) { .tp-related .tp-cards { grid-template-columns: 1fr 1fr 1fr; } }
.tp-related .tp-card-title { font-size: 1rem; }

.bl-prose { font-size: 17px; line-height: 1.75; color: var(--c-text-2); overflow-wrap: break-word; }
.bl-prose > :first-child { margin-top: 0; }
.bl-prose > * + * { margin-top: 1.15em; }
.bl-prose p, .bl-prose ul, .bl-prose ol, .bl-prose blockquote, .bl-prose pre, .bl-prose table, .bl-prose figure { margin-bottom: 0; }
.bl-prose h2, .bl-prose h3, .bl-prose h4 { color: var(--c-text); font-weight: 700; margin-bottom: 0; }
.bl-prose h2 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.025em; margin-top: 1.9em; }
.bl-prose h3 { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.015em; margin-top: 1.5em; }
.bl-prose h4 { font-size: 1.05rem; margin-top: 1.4em; }
.bl-prose strong { color: var(--c-text); font-weight: 600; }
body.tp .bl-prose a { color: var(--c-primary); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--c-primary) 40%, transparent); text-underline-offset: 3px; }
body.tp .bl-prose a:hover { color: var(--c-primary-hover); text-decoration-color: currentColor; }
.bl-prose ul, .bl-prose ol { padding-inline-start: 1.3em; }
.bl-prose li + li { margin-top: 0.4em; }
.bl-prose li::marker { color: var(--c-primary); }
.bl-prose img { border-radius: 16px; border: 1px solid var(--c-border); }
.bl-prose hr { height: 1px; background: var(--engrave); border: 0; margin-block: 2.5em; }
.bl-prose blockquote {
  margin-inline: 0;
  padding: 1rem 1.25rem;
  border-inline-start: 2px solid var(--c-primary);
  border-radius: 0 16px 16px 0;
  background: var(--c-surface-2);
  color: var(--c-text);
}
.bl-prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--c-text);
}
.bl-prose pre {
  background: var(--c-surface-2);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.65;
}
.bl-prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.bl-prose table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.bl-prose th, .bl-prose td { border: 1px solid var(--c-border); padding: 0.6rem 0.85rem; text-align: start; vertical-align: top; }
.bl-prose th { background: var(--c-surface); color: var(--c-text); font-weight: 600; }

.bl-reactions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 2rem; }
.bl-react {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.bl-react:hover { border-color: var(--c-border-strong); background: var(--c-surface-hover); }
.bl-react.reacted { border-color: var(--c-primary); background: var(--c-primary-tint); }
.bl-react-count { color: var(--c-text-3); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Engine pages (author profile, editorial policy) on the same surfaces. */
body.tp .bl-page { max-width: calc(48rem + 2 * var(--tp-gutter)); padding: 3.5rem var(--tp-gutter) 0; margin: 0 auto 0 0; }
body.tp .bl-page h1 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.06; letter-spacing: -0.025em; font-weight: 700; margin: 1rem 0 0.75rem; }
body.tp .bl-page-crumbs { font-size: 0.8125rem; color: var(--c-text-3); opacity: 1; }
body.tp .bl-page-crumbs a { color: var(--c-text-2); }
body.tp .bl-abox { background: var(--c-surface); border-color: var(--c-border); border-radius: 16px; }
body.tp .bl-abox-n a, body.tp .bl-abox-l a, body.tp .bl-plist a, body.tp .bl-byline a { color: var(--c-text); }
body.tp .bl-abox-l a:hover, body.tp .bl-plist a:hover, body.tp .bl-byline a:hover { color: var(--c-primary); }
body.tp .bl-plist li { border-top-color: var(--c-border); }

@media (prefers-reduced-motion: reduce) {
  .tp-card, .tp-btn, .bl-react { transition: none; }
}

/* Right-to-left and joined scripts: the wordmark keeps its order, and no
   letter spacing, which breaks joined letters (Arabic, Persian, Hindi). */
[dir="rtl"] .sf-logo { direction: ltr; }
[dir="rtl"] .bl-prose blockquote { border-radius: 16px 0 0 16px; }
:is(html[lang="ar"], html[lang="fa"], html[lang="hi"]) :is(body, body *) { letter-spacing: 0 !important; }
/* The fixed-width fallback stretches Arabic and Persian letters; labels use the body font. */
:is(html[lang="ar"], html[lang="fa"]) { --font-mono: var(--font-sans); }
