/*
 * assets/pseo.css
 *
 * WHAT THIS FILE DOES:
 * Page-specific layout and component styles for ZeroTouch SP Programmatic SEO
 * pages (`/rules/*.html`, `/flat-file/*.html`, `/rules.html`, `/flat-file.html`),
 * layered on top of ZeroTouch's shared `/lib/v2.css`.
 *
 * WHY IT EXISTS / INVARIANTS FOR LATER AGENTS:
 * `/lib/v2.css` provides the core brand tokens (`--ink`, `--apricot`, `--teal`,
 * `--rose`, `.enamel`, `.well`, `.btn`, `.chip`, `.zt-hdr`, `.zt-ftr`).
 * This stylesheet adds the structured prose, fact table, side-by-side validator
 * example comparison, breadcrumb, and mini-checker layouts without modifying
 * `ZeroTouch/web/lib/v2.css`.
 */

.pseo-main {
  padding-top: 32px;
  padding-bottom: 88px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.pseo-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 18px;
  color: #2B1322;
  background: radial-gradient(circle at 32% 28%, #FFE9DB 0%, #FFB591 42%, #E27A50 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.75), 0 4px 10px rgba(0, 0, 0, 0.45);
}

/* Breadcrumb */
.pseo-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-dim);
}

.pseo-breadcrumb a {
  color: var(--text);
}

.pseo-breadcrumb a:hover {
  color: var(--apricot);
}

.pseo-crumb-sep {
  color: var(--text-dim);
  user-select: none;
}

/* Hero & Meta Row */
.pseo-hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pseo-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.pseo-hero h1.display {
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.12;
}

/* Short answer box (featured snippet target) */
.pseo-short-answer {
  padding: 24px 28px;
  border-left: 4px solid var(--apricot);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pseo-short-answer p {
  margin: 0;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-hi);
  font-weight: 500;
}

/* Generic section container */
.pseo-section {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pseo-section h2.display {
  font-size: clamp(22px, 2.8vw, 30px);
}

/* Fact Table & Column Names Table */
.pseo-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(16, 11, 30, 0.55);
}

.pseo-fact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
}

.pseo-fact-table th,
.pseo-fact-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.pseo-fact-table tr:last-child th,
.pseo-fact-table tr:last-child td {
  border-bottom: none;
}

.pseo-fact-table th {
  width: 210px;
  color: var(--text-hi);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}

.pseo-fact-table thead th {
  width: auto;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--apricot);
  background: rgba(255, 255, 255, 0.04);
}

.pseo-verify-note {
  color: var(--text-dim);
  font-size: 13px;
}

.pseo-reject-note {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

/* Mini-checker */
.pseo-checker {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-color: rgba(255, 180, 143, 0.28);
}

.pseo-checker-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.pseo-field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pseo-bullets-grid,
.pseo-highlights-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pseo-privacy-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

.pseo-checker-results {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pseo-counter-bar {
  font-size: 14px;
  color: var(--text-hi);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.pseo-findings-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pseo-finding-current {
  border-radius: 12px;
  background: rgba(255, 111, 134, 0.09);
  border: 1px solid rgba(255, 111, 134, 0.35);
}

.pseo-finding-pass {
  border-radius: 12px;
  background: rgba(94, 211, 192, 0.08);
  border: 1px solid rgba(94, 211, 192, 0.25);
}

.pseo-checker-nudge {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-hi);
}

/* Prose formatting */
.pseo-prose p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.72;
  color: var(--text);
}

.pseo-prose p:last-child {
  margin-bottom: 0;
}

.pseo-prose ul,
.pseo-prose ol {
  margin: 0 0 14px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pseo-prose code,
.pseo-fact-table code {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.92em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-hi);
}

.pseo-faq h3 {
  margin: 18px 0 6px;
  font-size: 18px;
  color: var(--text-hi);
  font-weight: 700;
}

.pseo-faq h3:first-of-type {
  margin-top: 4px;
}

/* Examples: fails vs fixed */
.pseo-examples-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.pseo-example-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pseo-example-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pseo-verdict-label {
  font-size: 12px;
  color: var(--text-dim);
}

.pseo-code {
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  background: rgba(8, 5, 16, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text-hi);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.pseo-repair-callout {
  padding: 16px 20px;
  border-left: 3px solid var(--teal);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pseo-repair-callout p {
  margin: 0;
  color: var(--text-hi);
  font-weight: 600;
}

/* Related & Hub Lists */
.pseo-related-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.pseo-link-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pseo-hub-list,
.pseo-rules-card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.pseo-hub-item,
.pseo-rule-summary-item {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pseo-hub-item-head,
.pseo-rule-summary-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pseo-limit-tag {
  font-size: 13px;
  color: var(--apricot);
}

.pseo-hub-item h3 {
  margin: 0;
  font-size: 19px;
}

.pseo-hub-item p,
.pseo-rule-summary-item p {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.pseo-rule-summary-link {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-hi);
}

.pseo-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* CTA Block */
.pseo-cta-block {
  padding: 32px 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.pseo-cta-content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pseo-cta-content p {
  margin: 0;
  font-size: 16px;
}

.pseo-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.pseo-footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
