/* =====================================================================
   automate.css — page styles for /automate/ (gallery + detail).
   The header/nav, :root design tokens, .btn* and footer come from
   style.css (always loaded). This file owns everything page-specific,
   and ports the few template-card/app-chip rules these pages reuse.
   ===================================================================== */

.adp, .agl { background: var(--cream); }

/* ---------- Shared section scaffolding ---------- */
.adp-section { padding: 5.5rem 2rem; }
.adp-section-inner { max-width: 1180px; margin: 0 auto; }
.adp-narrow { max-width: 760px; }
.adp-section-head { text-align: center; margin-bottom: 2.75rem; }
.adp-kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: 0.85rem;
}
.adp-h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  line-height: 1.15;
  color: var(--charcoal);
  margin: 0;
}
.adp-h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.45rem;
  color: var(--charcoal);
  margin: 0 0 0.5rem;
}
.adp-section-desc { color: var(--text-muted); font-size: 1.02rem; margin: 0.9rem auto 0; max-width: 560px; }
.adp-muted { color: var(--text-muted); font-size: 0.98rem; line-height: 1.6; }

/* ---------- Detail hero ---------- */
.adp-hero {
  position: relative;
  padding: 9rem 2rem 4.5rem;
  overflow: hidden;
}
.adp-hero::before {
  content: "";
  position: absolute;
  top: -28%;
  right: -8%;
  width: 900px;
  height: 620px;
  background: radial-gradient(ellipse at center, rgba(26, 58, 50, 0.07), transparent 62%);
  pointer-events: none;
  z-index: 0;
}
.adp-hero-grid {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 3.5rem;
  align-items: center;
}
.adp-hero-visual { position: relative; z-index: 1; }
.adp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s ease;
}
.adp-back:hover { color: var(--forest); }
.adp-eyebrow {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: 1rem;
}
.adp-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0 0 1.1rem;
}
.adp-summary {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 0 1.8rem;
}
.adp-hero-meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  margin-bottom: 2rem;
}
.adp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(26, 58, 50, 0.08);
  color: var(--forest);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
}
.adp-hero-cta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.adp-trust {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}
.adp-trust svg { color: var(--forest); }

/* ---------- Section background rhythm (detail) ---------- */
.adp-run-section    { background: #fff; }
.adp-runset-section { background: var(--cream); }
.adp-need-section   { background: #fff; }
.adp-faq-section    { background: var(--cream); }
.adp-related-section{ background: var(--cream-dark); }

/* ---------- Dashboard-identical flow diagram (lives in the hero, right column) ----------
   dotted canvas · trigger pill · WebRun node · dashed SVG fan · numbered cards · arrows */
.wfd {
  position: relative;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background-color: #f4f2ef;
  background-image: radial-gradient(circle, rgba(26, 58, 50, 0.11) 1px, transparent 1.4px);
  background-size: 15px 15px;
  padding: 2.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 360px;
}
.wfd-trigger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: #dee0dc;
  border: 1px solid var(--forest);
  color: var(--forest);
  border-radius: 999px;
  font-size: 0.78rem; font-weight: 600;
  padding: 0.34rem 0.85rem;
}
.wfd-trigger svg { width: 13px; height: 13px; }
.wfd-vline { width: 0; height: 18px; border-left: 1.5px dashed rgba(26, 58, 50, 0.4); }
.wfd-webrun {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: #fff;
  border: 1px solid var(--forest);
  border-radius: 11px;
  padding: 0.5rem 0.85rem;
  box-shadow: 0 4px 14px rgba(26, 58, 50, 0.14);
}
.wfd-wr-logo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--forest);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wfd-wr-logo svg { width: 19px; height: 19px; }
.wfd-wr-text { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.wfd-wr-text b { font-size: 0.85rem; font-weight: 700; color: var(--charcoal); }
.wfd-wr-text i { font-size: 0.68rem; font-style: normal; color: var(--text-muted); }
.wfd-fan { width: 100%; max-width: 440px; height: 46px; }
.wfd-fan path { fill: none; stroke: rgba(26, 58, 50, 0.35); stroke-width: 1.2; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.wfd-steps { display: flex; align-items: stretch; justify-content: center; gap: 0.3rem; width: 100%; flex-wrap: nowrap; }
.wfd-step {
  position: relative;
  flex: 0 1 152px;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 1.2rem 0.6rem 0.75rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.wfd-num {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--forest); color: #fff;
  font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #f4f2ef;
}
.wfd-logo {
  width: 38px; height: 38px; border-radius: 10px;
  background: #fff; border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex; align-items: center; justify-content: center; color: var(--forest);
}
.wfd-logo img { width: 24px; height: 24px; border-radius: 5px; object-fit: contain; }
.wfd-logo svg { width: 20px; height: 20px; }
.wfd-app { font-size: 0.86rem; font-weight: 700; color: var(--charcoal); }
.wfd-act { font-size: 0.68rem; color: var(--text-muted); line-height: 1.3; }
.wfd-arrow { display: flex; align-items: center; align-self: center; color: rgba(26, 58, 50, 0.4); flex-shrink: 0; }
.wfd-arrow svg { width: 22px; height: 11px; }

/* ---------- What happens on every run (enriched timeline) ---------- */
.run-timeline { list-style: none; margin: 0; padding: 0; position: relative; text-align: left; }
.run-timeline::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: rgba(26, 58, 50, 0.16);
}
.run-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 0 0 1.5rem;
}
.run-step:last-child { padding-bottom: 0; }
.run-dot {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 700;
  border: 3px solid #fff;
}
.run-dot-start { background: var(--coral); }
.run-dot-start svg { width: 14px; height: 14px; }
.run-body { padding-top: 0.45rem; min-width: 0; }
.run-title { font-size: 1.06rem; font-weight: 700; color: var(--charcoal); line-height: 1.3; }
.run-role { font-weight: 500; color: var(--text-muted); }
.run-lead { margin: 0.4rem 0 0; font-size: 0.96rem; color: var(--text-muted); line-height: 1.55; }
.run-lead code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(26, 58, 50, 0.08);
  color: var(--forest);
  padding: 0.1rem 0.4rem;
  border-radius: 5px;
}
.run-bullets { margin: 0.55rem 0 0; padding-left: 1.15rem; }
.run-bullets li { font-size: 0.96rem; color: var(--text); line-height: 1.5; margin-bottom: 0.35rem; }
.run-done {
  margin: 0.8rem 0 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.run-done span {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #16A34A;
  background: var(--green-soft);
  padding: 0.16rem 0.5rem;
  border-radius: 5px;
}

/* ---------- Per-step screenshot (browser-framed, embedded in the timeline) ---------- */
.run-shot { margin: 0.85rem 0 0.1rem; max-width: 560px; }
.run-shot-frame {
  border: 1px solid rgba(26, 58, 50, 0.14);
  border-radius: 11px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(26, 58, 50, 0.05), 0 14px 34px -20px rgba(26, 58, 50, 0.32);
}
.run-shot-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  background: var(--cream, #f7f5ef);
  border-bottom: 1px solid rgba(26, 58, 50, 0.1);
}
.run-shot-dots { display: inline-flex; gap: 5px; flex-shrink: 0; }
.run-shot-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(26, 58, 50, 0.18); }
.run-shot-url {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid rgba(26, 58, 50, 0.1);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.run-shot-url img { border-radius: 3px; flex-shrink: 0; }
.run-shot-img { display: block; width: 100%; height: auto; }
.run-shot-cap {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ---------- Run settings (readable config panel) ---------- */
.runset-panel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.runset-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.runset-row:first-child { border-top: none; }
.runset-ic {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
}
.runset-ic svg { width: 19px; height: 19px; }
.runset-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.runset-name { font-weight: 700; font-size: 0.98rem; color: var(--charcoal); }
.runset-note { font-size: 0.84rem; color: var(--text-muted); line-height: 1.4; }
.runset-val {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--forest);
  text-align: right;
  max-width: 46%;
  word-break: break-word;
}

/* ---------- What you'll need + governance ---------- */
.adp-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; }
.need-card {
  background: var(--cream);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.logins-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.1rem; }
.login-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
}
.login-ic {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--cream);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--forest);
}
.login-ic img { width: 22px; height: 22px; border-radius: 5px; object-fit: contain; }
.login-ic svg { width: 18px; height: 18px; }
.login-name { flex: 1; min-width: 0; font-weight: 700; font-size: 0.98rem; color: var(--charcoal); }
.login-tag {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--forest);
  background: rgba(26, 58, 50, 0.08);
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
}
.need-note {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-top: 1.1rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}
.need-note svg { flex-shrink: 0; margin-top: 2px; color: var(--forest); }

.policy-callout {
  background: var(--forest);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.policy-name { font-family: var(--font-serif); font-size: 1.45rem; margin-bottom: 0.5rem; }
.policy-desc { color: rgba(255, 255, 255, 0.82); font-size: 0.96rem; line-height: 1.6; margin: 0 0 0.9rem; }
.policy-caps { display: flex; flex-direction: column; margin: 0 0 1.1rem; }
.policy-cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.policy-cap:first-child { border-top: none; }
.policy-cap-label { font-size: 0.94rem; font-weight: 500; color: rgba(255, 255, 255, 0.92); }
.policy-state {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
}
.policy-state-allow { color: #4ADE80; background: rgba(34, 197, 94, 0.16); }
.policy-state-guardrail { color: #FBBF24; background: rgba(245, 158, 11, 0.16); }
.policy-state-block { color: #FCA5A5; background: rgba(248, 113, 113, 0.18); }
.policy-state-allowlist { color: rgba(255, 255, 255, 0.92); background: rgba(255, 255, 255, 0.14); }
.policy-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}
.policy-env { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin: 0; }
.policy-env strong { color: #fff; }
.policy-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.86rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.policy-link:hover { border-color: #fff; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 0.8rem; }
.faq-item {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 0 1.4rem;
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--charcoal);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.faq-mark::before, .faq-mark::after {
  content: "";
  position: absolute;
  background: var(--forest);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.faq-mark::before { top: 6px; left: 0; width: 14px; height: 2px; }
.faq-mark::after  { left: 6px; top: 0; width: 2px; height: 14px; }
.faq-item[open] .faq-mark::after { transform: scaleY(0); opacity: 0; }
.faq-item p { margin: 0; padding: 0 0 1.3rem; color: var(--text-muted); font-size: 0.98rem; line-height: 1.65; }

/* ---------- Related grid ---------- */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--forest); padding: 5rem 2rem; text-align: center; }
.cta-band-inner { max-width: 680px; margin: 0 auto; }
.cta-band-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #fff;
  margin: 0 0 0.8rem;
  line-height: 1.12;
}
.cta-band-sub { color: rgba(255, 255, 255, 0.78); font-size: 1.08rem; line-height: 1.6; margin: 0 0 2rem; }
.cta-band-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0.8rem; }
.cta-band-primary { background: var(--cream); color: var(--forest); border: none; }
.cta-band-primary:hover { background: #fff; transform: translateY(-1px); }
.cta-band-ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.cta-band-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- Gallery hero ---------- */
.agl-hero { padding: 7rem 2rem 3rem; text-align: center; }
.agl-hero-inner { max-width: 760px; margin: 0 auto; }
.agl-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0 0 1.1rem;
}
.agl-title em { font-style: italic; color: var(--forest); }
.agl-sub { font-size: 1.16rem; line-height: 1.6; color: var(--text-muted); max-width: 600px; margin: 0 auto 1.8rem; }
.agl-hero-cta { display: flex; justify-content: center; }

/* ---------- Gallery grid ---------- */
.agl-grid-section { padding: 1rem 2rem 5.5rem; }
.agl-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tpl-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.3rem 1.4rem 0;
}
.tpl-card-cat {
  font-size: 0.66rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--coral);
}
.tpl-card-arrow {
  display: inline-flex;
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}
.tpl-card-link:hover .tpl-card-arrow { opacity: 1; transform: translateX(0); color: var(--forest); }
.agl-grid .tpl-card-title { padding-top: 0.6rem; }

/* ---------- Gallery browse: search + category filters ---------- */
.agl-browse { max-width: 1180px; margin: 0 auto 2.25rem; }
.agl-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  padding: 0.35rem 0.4rem 0.35rem 1.05rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.agl-search:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(26, 58, 50, 0.12);
}
.agl-search-ic { flex-shrink: 0; color: var(--text-muted); display: flex; }
.agl-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--charcoal);
  padding: 0.6rem 0.2rem;
}
.agl-search-input::placeholder { color: var(--text-muted); }
.agl-search-btn {
  flex-shrink: 0;
  background: var(--forest);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.62rem 1.5rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.agl-search-btn:hover { background: var(--forest-light); transform: translateY(-1px); }

.agl-cats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 1.1rem 0 0;
  /* Reset the global `nav {}` navbar styling (white pill, 100px radius,
     80% width + auto-centering) that would otherwise bleed onto this <nav>. */
  width: auto;
  max-width: none;
  padding: 0;
  background: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.agl-cat {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.agl-cat:hover { border-color: rgba(26, 58, 50, 0.45); }
.agl-cat.is-active { background: var(--forest); border-color: var(--forest); color: #fff; }
.agl-cat-n {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--cream);
  border-radius: 999px;
  padding: 0.08rem 0.46rem;
}
.agl-cat.is-active .agl-cat-n { color: #fff; background: rgba(255, 255, 255, 0.2); }

.agl-resultbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-top: 1.4rem;
}
.agl-count { font-size: 0.92rem; color: var(--text-muted); }
.agl-count strong { color: var(--charcoal); font-weight: 700; }
.agl-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--coral);
  text-decoration: none;
}
.agl-clear:hover { text-decoration: underline; }

/* ---------- Gallery empty state ---------- */
.agl-empty {
  max-width: 520px;
  margin: 1rem auto;
  text-align: center;
  padding: 3rem 1.5rem;
}
.agl-empty-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--cream-dark);
  color: var(--forest);
  margin-bottom: 1.1rem;
}
.agl-empty-title { font-family: var(--font-serif); font-weight: 400; font-size: 1.6rem; color: var(--charcoal); margin: 0 0 0.5rem; }
.agl-empty-sub { color: var(--text-muted); font-size: 1rem; line-height: 1.6; margin: 0 0 1.5rem; }

/* ---------- Gallery pagination ---------- */
.agl-pagination {
  max-width: 1180px;
  margin: 3rem auto 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  /* Same reset: keep it a plain centered row, not the global navbar pill. */
  width: auto;
  padding: 0;
  background: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.agl-page {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 40px;
  height: 40px;
  padding: 0 0.55rem;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.agl-page:hover { border-color: rgba(26, 58, 50, 0.45); }
.agl-page.is-current { background: var(--forest); border-color: var(--forest); color: #fff; cursor: default; }
.agl-page-nav { padding: 0 0.9rem; }
.agl-page.is-disabled { opacity: 0.4; pointer-events: none; }
.agl-ellipsis { border: none; background: transparent; color: var(--text-muted); min-width: 24px; }

/* =====================================================================
   Ported template-card + app-chip rules (these pages reuse the card
   markup and the wr_appchip/wr_appflow output). Kept self-contained so
   /automate/ does not depend on business.css.
   ===================================================================== */
.tpl-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.tpl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.1);
  border-color: rgba(26, 58, 50, 0.25);
}
.tpl-card-link { text-decoration: none; color: inherit; cursor: pointer; }
.tpl-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--charcoal);
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding: 1.4rem 1.4rem 0;
}
.tpl-card-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
  padding: 0.55rem 1.4rem 1.2rem;
}
.tpl-card-foot {
  background: var(--cream);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1rem 1.4rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.tpl-flow { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 0.3rem; }
.tpl-flow-3 { gap: 0.22rem; }
.tpl-flow-3 .appchip { font-size: 0.68rem; padding: 0.2rem 0.45rem 0.2rem 0.34rem; gap: 0.28rem; }
.tpl-flow-3 .appchip-img { width: 14px; height: 14px; }
.tpl-flow-3 .appsep { font-size: 0.7rem; }
.appchip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  padding: 0.24rem 0.55rem 0.24rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.appchip-img { width: 16px; height: 16px; border-radius: 4px; object-fit: contain; display: block; }
.appchip-generic { display: inline-flex; align-items: center; justify-content: center; color: var(--forest); background: rgba(26, 58, 50, 0.08); }
.appchip-generic svg { width: 11px; height: 11px; }
.appsep { color: var(--text-muted); font-weight: 700; font-size: 0.78rem; opacity: 0.55; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .agl-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .adp-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .adp-hero-copy { text-align: center; }
  .adp-hero-meta, .adp-hero-cta { justify-content: center; }
  .adp-summary { margin-left: auto; margin-right: auto; }
  .adp-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .adp-section { padding: 4rem 1.4rem; }
  .agl-grid, .related-grid { grid-template-columns: 1fr; }
  .adp-hero { padding: 2.5rem 1.4rem 3rem; }
  .wfd { padding: 2rem 0.9rem; }
  .wfd-steps { flex-direction: column; align-items: center; gap: 1.4rem; }
  .wfd-step { flex: none; width: 78%; max-width: 250px; }
  .wfd-arrow { transform: rotate(90deg); }
  .wfd-fan { display: none; }
  .runset-row { flex-wrap: wrap; }
  .runset-val { max-width: none; width: 100%; text-align: left; padding-left: calc(40px + 1rem); }
}

/* ---------- In short: answer-first + at-a-glance facts (AEO/GEO) ---------- */
.adp-tldr-section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.adp-tldr-section .adp-narrow { max-width: 980px; }
.adp-tldr { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.5rem; align-items: start; }
.adp-tldr-main {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 1.9rem 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
.adp-tldr-q {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.2;
  color: var(--charcoal);
  margin: 0 0 0.7rem;
}
.adp-tldr-answer { font-size: 1.06rem; line-height: 1.65; color: var(--charcoal); margin: 0; }
.adp-outcomes { list-style: none; margin: 1.3rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.adp-outcomes li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.97rem; line-height: 1.5; color: var(--charcoal); }
.adp-outcomes li svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--forest); margin-top: 2px; }
.adp-whofor { margin: 1.25rem 0 0; font-size: 0.92rem; color: var(--text-muted); }
.adp-whofor span {
  font-weight: 700;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-right: 0.45rem;
}
.adp-glance {
  background: var(--cream);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
}
.adp-glance-title {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--coral);
  margin-bottom: 0.9rem;
}
.adp-glance-list { margin: 0; }
.adp-glance-row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.6rem 0; border-top: 1px solid rgba(0, 0, 0, 0.07); }
.adp-glance-row:first-child { border-top: none; padding-top: 0; }
.adp-glance-row dt { font-size: 0.86rem; color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.adp-glance-row dd { margin: 0; font-size: 0.9rem; color: var(--charcoal); font-weight: 600; text-align: right; word-break: break-word; }
.adp-glance-updated {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.adp-glance-updated time { font-weight: 700; color: var(--forest); }
@media (max-width: 760px) {
  .adp-tldr { grid-template-columns: 1fr; }
}
