/* Permits2Go feature-guide article typography for the Nexsas "automation-saas"
   theme. The compiled main.css only ships the utilities the template used, so
   long-form content (lists, tables, quotes, links) is styled here, scoped under
   .p2g-article and built from the theme's own tokens. Loaded after brand.css. */

.p2g-article {
  font-family: var(--font-inter-tight);
  color: var(--color-secondary);
}

.p2g-article > * + * {
  margin-top: calc(var(--spacing) * 5);
}

.p2g-article h2 {
  font-size: var(--text-heading-5);
  line-height: 130%;
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-secondary);
  margin-top: calc(var(--spacing) * 12);
  margin-bottom: calc(var(--spacing) * 3);
  scroll-margin-top: 120px;
}

@media (min-width: 48rem) {
  .p2g-article h2 {
    font-size: var(--text-heading-4);
    line-height: var(--text-heading-4--line-height);
  }
}

.p2g-article h3 {
  font-size: var(--text-heading-6);
  line-height: var(--text-heading-6--line-height);
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-secondary);
  margin-top: calc(var(--spacing) * 8);
  margin-bottom: calc(var(--spacing) * 2);
}

.p2g-article p,
.p2g-article li {
  font-size: var(--text-tagline-1);
  line-height: 165%;
  color: color-mix(in oklab, var(--color-background-14) 72%, transparent);
}

.p2g-article p.p2g-lead {
  font-size: 1.125rem;
  line-height: 160%;
  color: color-mix(in oklab, var(--color-background-14) 85%, transparent);
}

.p2g-article strong {
  font-weight: var(--font-weight-medium, 500);
  color: var(--color-secondary);
}

.p2g-article a {
  color: var(--color-primary-500);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.p2g-article a:hover {
  text-decoration-thickness: 2px;
}

.p2g-article ul,
.p2g-article ol {
  padding-left: calc(var(--spacing) * 6);
  margin-top: calc(var(--spacing) * 3);
}

.p2g-article ul {
  list-style: disc outside;
}

.p2g-article ol {
  list-style: decimal outside;
}

.p2g-article li + li {
  margin-top: calc(var(--spacing) * 2);
}

.p2g-article li::marker {
  color: var(--color-primary-500);
  font-weight: 500;
}

.p2g-article blockquote {
  margin: calc(var(--spacing) * 6) 0;
  padding: calc(var(--spacing) * 4) calc(var(--spacing) * 5);
  border-left: 3px solid var(--color-primary-500);
  background: var(--color-background-3);
  border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
}

.p2g-article blockquote p {
  font-style: italic;
  color: var(--color-secondary);
}

.p2g-article blockquote cite {
  display: block;
  margin-top: calc(var(--spacing) * 2);
  font-size: var(--text-tagline-2);
  font-style: normal;
  color: color-mix(in oklab, var(--color-background-14) 60%, transparent);
}

/* Tables: full width, scroll inside their own box on narrow screens. */
.p2g-table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: calc(var(--spacing) * 4);
  border: 1px solid var(--color-stroke-3);
  border-radius: var(--radius-xl);
}

.p2g-article table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-tagline-2);
  line-height: 150%;
  min-width: 480px;
}

.p2g-article th,
.p2g-article td {
  text-align: left;
  vertical-align: top;
  padding: calc(var(--spacing) * 3) calc(var(--spacing) * 4);
  border-bottom: 1px solid var(--color-stroke-3);
  color: color-mix(in oklab, var(--color-background-14) 80%, transparent);
}

.p2g-article th {
  font-weight: 500;
  color: var(--color-secondary);
  background: var(--color-background-3);
}

.p2g-article tbody tr:nth-child(even) td {
  background: color-mix(in oklab, var(--color-background-3) 55%, transparent);
}

.p2g-article tbody tr:last-child td {
  border-bottom: 0;
}

/* Product screenshot inside a guide. Sized by width/height attributes on the
   <img> so the layout is stable before it lazy-loads. */
.p2g-article figure.p2g-figure {
  margin: calc(var(--spacing) * 6) 0 0;
}

.p2g-article figure.p2g-figure.p2g-figure-portrait {
  max-width: 480px;
  margin-inline: auto;
}

.p2g-article figure.p2g-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-stroke-3);
  border-radius: var(--radius-xl);
}

.p2g-article figure.p2g-figure figcaption {
  margin-top: calc(var(--spacing) * 2);
  font-size: var(--text-tagline-2);
  line-height: 150%;
  text-align: center;
  color: color-mix(in oklab, var(--color-background-14) 60%, transparent);
}

/* Callout box */
.p2g-callout {
  margin-top: calc(var(--spacing) * 6);
  padding: calc(var(--spacing) * 5) calc(var(--spacing) * 6);
  background: var(--color-background-3);
  border-radius: 20px;
}

.p2g-callout p + p {
  margin-top: calc(var(--spacing) * 3);
}

/* FAQ: native details/summary so it works without JavaScript. */
.p2g-faq details {
  border-top: 1px solid var(--color-stroke-3);
  padding: calc(var(--spacing) * 4) 0;
}

.p2g-faq details:last-child {
  border-bottom: 1px solid var(--color-stroke-3);
}

.p2g-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: calc(var(--spacing) * 4);
  font-size: var(--text-tagline-1);
  font-weight: 500;
  color: var(--color-secondary);
}

.p2g-faq summary::-webkit-details-marker {
  display: none;
}

.p2g-faq summary::after {
  content: "+";
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--color-stroke-3);
  font-weight: 400;
  color: var(--color-primary-500);
}

.p2g-faq details[open] summary::after {
  content: "\2212";
}

.p2g-faq details p {
  margin-top: calc(var(--spacing) * 3);
}

/* Post meta line and section eyebrow */
.p2g-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
  font-size: var(--text-tagline-2);
  color: color-mix(in oklab, var(--color-background-14) 60%, transparent);
}

.p2g-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--color-primary-500) 12%, white);
  color: var(--color-primary-500);
  font-size: var(--text-tagline-3, 0.75rem);
  font-weight: 500;
}

/* Prev / next / related links */
.p2g-links a {
  color: var(--color-secondary);
  text-decoration: none;
}

.p2g-links a:hover {
  color: var(--color-primary-500);
}

/* Listing cards */
.p2g-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: calc(var(--spacing) * 7);
  background: #fff;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: border-color .2s ease, transform .2s ease;
}

.p2g-card:hover {
  border-color: var(--color-stroke-3);
  transform: translateY(-2px);
}

.p2g-card .p2g-card-title {
  margin-top: calc(var(--spacing) * 3);
  font-size: var(--text-heading-6);
  line-height: var(--text-heading-6--line-height);
  font-weight: 500;
  color: var(--color-secondary);
}

.p2g-card .p2g-card-excerpt {
  margin-top: calc(var(--spacing) * 2);
  font-size: var(--text-tagline-2);
  line-height: 155%;
  color: color-mix(in oklab, var(--color-background-14) 60%, transparent);
  flex-grow: 1;
}

.p2g-card .p2g-card-cta {
  margin-top: calc(var(--spacing) * 4);
  font-size: var(--text-tagline-2);
  font-weight: 500;
  color: var(--color-primary-500);
}

/* Breadcrumb under the page hero */
.p2g-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--spacing) * 2);
  font-size: var(--text-tagline-2);
  color: color-mix(in oklab, var(--color-background-14) 60%, transparent);
}

.p2g-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.p2g-breadcrumb a:hover {
  color: var(--color-primary-500);
}

.p2g-breadcrumb li + li::before {
  content: "/";
  margin-right: calc(var(--spacing) * 2);
  opacity: .5;
}
