/* ==========================================================================
   CPM Calculator Hub — design system (production)
   Single stylesheet; minify for production if your stack supports it.
   No third-party JS on public pages — keeps TTFB and parsing light.
   ========================================================================== */

:root {
  --color-bg: #0b1220;
  --color-bg-elevated: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-soft: rgba(255, 255, 255, 0.05);
  --color-text: #e8eefc;
  --color-text-muted: #aab7df;
  --color-text-soft: #d9e5ff;
  --color-accent: #4f7cff;
  --color-accent-hover: #3c6dff;
  --shadow-sm: 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --radius-lg: 14px;
  --container-max: 1100px;
  --container-pad: 20px;
  --section-gap: 60px;
  --block-pad: 24px;
  --prose-max: 700px;
  --line-prose: 1.7;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 64px;
  --tap-min: 44px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: var(--line-prose);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* ----- Container (single system site-wide) ----- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* ----- Typography ----- */
h1 {
  margin: 0 0 0.5em;
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 0.45em;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  margin: 0 0 0.4em;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

p {
  margin: 0 0 1em;
  max-width: var(--prose-max);
  color: var(--color-text-soft);
  line-height: var(--line-prose);
}

.prose-block p,
.content-block p,
.cpm-prose p {
  max-width: var(--prose-max);
}

section.content-block {
  margin-top: var(--section-gap);
}

section.content-block:first-child {
  margin-top: 0;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.88);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
}

/* Admin & legacy headers: single .container row */
.site-header > .container:not(.site-header__inner) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 12px;
  position: relative;
}

.brand {
  flex: 1 1 auto;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.site-menu-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.site-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  width: var(--tap-min);
  height: var(--tap-min);
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  align-items: center;
}

.site-menu-btn__bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 8px;
  flex: 1 1 100%;
  order: 4;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 8px 14px;
  border-radius: 10px;
  color: #d0ddff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 769px) {
  .site-header__inner {
    flex-wrap: nowrap;
  }

  .site-menu-btn {
    display: none !important;
  }

  .site-nav {
    flex: 0 1 auto;
    order: 0;
    width: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }
}

@media (max-width: 768px) {
  .site-menu-btn {
    display: flex;
    order: 2;
  }

  .brand {
    order: 1;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    padding: 8px 0 16px;
    margin: 0 calc(-1 * var(--container-pad)) 0;
    padding-left: var(--container-pad);
    padding-right: var(--container-pad);
    background: rgba(11, 18, 32, 0.98);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .site-nav a {
    width: 100%;
    padding: 16px 18px;
    border-radius: var(--radius);
    font-size: 1.05rem;
    justify-content: flex-start;
  }

  .site-menu-toggle:checked ~ .site-nav {
    display: flex;
  }

  .site-menu-toggle:checked ~ .site-menu-btn .site-menu-btn__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .site-menu-toggle:checked ~ .site-menu-btn .site-menu-btn__bar:nth-child(2) {
    opacity: 0;
  }

  .site-menu-toggle:checked ~ .site-menu-btn .site-menu-btn__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

/* ----- Main ----- */
.site-main {
  min-height: 50vh;
  padding-top: 32px;
  padding-bottom: 64px;
}

@media (max-width: 720px) {
  .site-main {
    padding-top: 24px;
    padding-bottom: 48px;
  }
}

.site-main__inner {
  padding-top: 0;
  padding-bottom: 0;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 12px 20px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(79, 124, 255, 0.35);
}

.btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 124, 255, 0.45);
}

.btn:active {
  transform: translateY(0);
}

.btn-cta {
  width: 100%;
  margin-top: 14px;
  padding: 16px 20px;
  font-size: 1.05rem;
}

/* ----- Cards & panels ----- */
.card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  padding: var(--block-pad);
  box-shadow: var(--shadow-sm);
}

.soft-panel {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  padding: var(--block-pad);
  box-shadow: var(--shadow-sm);
}

.soft-grid {
  margin-top: 28px;
}

/* ----- Grids ----- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ----- Hero (home & shared) ----- */
.hero {
  padding: 8px 0 24px;
}

.hero h1 {
  margin: 0 0 8px;
}

.hero-brand {
  margin: 0 0 16px;
  font-size: 0.98rem;
  color: #9fb0df;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-lead {
  max-width: var(--prose-max);
  margin-left: auto;
  margin-right: auto;
  color: var(--color-text-soft);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-variants {
  margin: 0 0 6px;
  color: #c8d8ff;
  font-weight: 700;
}

.meta-line {
  margin-top: 10px;
  color: #9fb0df;
  font-size: 0.95rem;
}

.hero-premium {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
  justify-items: center;
  text-align: center;
}

@media (max-width: 720px) {
  .hero-premium {
    gap: 24px;
  }
}

.hero-copy {
  max-width: 720px;
}

.hero-calculator {
  width: min(560px, 100%);
  padding: var(--block-pad);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

.hero-calculator form .form-field {
  width: 100%;
}

.hero-calculator .form-input {
  width: 100%;
}

.result-inline {
  margin-top: 12px;
  font-size: 1rem;
}

.trust-points {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  color: #c6d7ff;
}

.trust-points li {
  margin-bottom: 8px;
}

.trust-points li::before {
  content: "• ";
  color: #8db1ff;
}

.cta-subtext {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: #9fb0df;
}

.home-cpm-snapshot {
  margin-bottom: 8px;
  max-width: var(--prose-max);
  margin-left: auto;
  margin-right: auto;
}

.home-cpm-snapshot h2 {
  text-align: center;
}

.home-cpm-snapshot p {
  margin-left: auto;
  margin-right: auto;
}

.home-cpm-snapshot__cta {
  text-align: center;
  margin-top: 20px;
}

.cluster-pillar-note {
  font-size: 0.92rem;
  margin-bottom: 14px;
  max-width: none;
}

.soft-grid .soft-panel p a {
  color: #8db1ff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.soft-grid .soft-panel p a:hover {
  color: #fff;
}

.breadcrumb {
  margin: 0 0 20px;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #c4d5ff;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #fff;
}

/* ----- Content blocks ----- */
.content-block {
  line-height: var(--line-prose);
}

.content-block h2 {
  margin-bottom: 0.5em;
}

.content-block h3 {
  margin-top: 1.25em;
  margin-bottom: 0.35em;
  font-size: 1.15rem;
}

.content-block p {
  margin-bottom: 1.1em;
}

.prose-block {
  max-width: var(--prose-max);
  margin-left: auto;
  margin-right: auto;
}

.prose-block a {
  color: #8db1ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

.prose-block a:hover {
  color: #fff;
}

.formula-block {
  margin-top: var(--section-gap);
  text-align: center;
}

.formula {
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 8px 0;
  color: #9eb8ff;
}

.internal-links .list li {
  padding: 14px 0;
}

.list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.list li:last-child {
  border-bottom: none;
}

.list a {
  color: #dbe6ff;
  text-decoration: none;
  font-weight: 700;
}

.list a:hover {
  color: #fff;
}

.muted {
  color: var(--color-text-muted);
  margin-top: 6px;
}

.content {
  white-space: pre-wrap;
  line-height: 1.65;
}

/* ----- Forms ----- */
form .row {
  display: flex;
  gap: 12px;
}

@media (max-width: 720px) {
  form .row {
    flex-direction: column;
  }
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.92rem;
}

.form-field {
  margin-bottom: 16px;
}

.form-field:last-of-type {
  margin-bottom: 0;
}

.form-field > label {
  display: block;
  margin-bottom: 7px;
}

input.form-input,
textarea.form-input,
select.form-input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
  font-family: inherit;
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.form-input {
  min-height: 140px;
  resize: vertical;
}

input.form-input::placeholder,
textarea.form-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

input.form-input:focus,
textarea.form-input:focus,
select.form-input:focus {
  outline: none;
  border-color: #4f7cff;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.28);
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23aab7df' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

form .form-field + .btn,
form .form-field + .btn-cta {
  margin-top: 16px;
}

.error {
  color: #ff7b7b;
  margin-top: 10px;
}

.ok {
  color: #7dffb2;
  margin-top: 10px;
}

/* ----- Footer ----- */
.site-footer {
  padding: 48px 0 40px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.footer-col--brand {
  max-width: 320px;
}

.footer-brand {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
}

.footer-tagline {
  margin: 10px 0 0;
  max-width: none;
  line-height: 1.65;
}

.footer-heading {
  margin: 0 0 12px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8a9bc4;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-nav a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  color: #c6d7ff;
  text-decoration: none;
  font-weight: 600;
  padding: 4px 0;
  border-radius: 6px;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-note {
  margin: 0 0 12px;
  max-width: 280px;
  line-height: 1.65;
}

.footer-copy {
  margin: 0;
  font-size: 0.88rem;
  color: #7d8aad;
}

.site-footer__legal {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.site-footer__legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

.site-footer__legal-nav a {
  color: #c6d7ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.site-footer__legal-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer__copy {
  margin: 0;
  font-size: 0.88rem;
  color: #7d8aad;
}

@media (max-width: 560px) {
  .site-footer__legal {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ----- Blog index ----- */
.blog-page {
  width: 100%;
}

.blog-hero {
  text-align: left;
  margin-bottom: 40px;
  max-width: 720px;
}

.blog-hero h1 {
  margin-bottom: 0.45em;
}

.blog-hero__lead {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--color-text-soft);
  max-width: none;
}

.blog-empty {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
  max-width: 520px;
  margin: 0 auto;
}

.blog-empty__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: #8db1ff;
}

.blog-empty__icon svg {
  display: block;
}

.blog-empty h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5em;
}

.blog-empty p {
  margin: 0 auto 24px;
  max-width: 400px;
  color: var(--color-text-soft);
  line-height: 1.65;
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 8px;
}

@media (min-width: 640px) {
  .blog-posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .blog-posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.12);
}

.blog-card__meta {
  font-size: 0.82rem;
  color: #9fb0df;
  margin-bottom: 10px;
}

.blog-card__title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.blog-card__title a {
  color: #e8eefc;
  text-decoration: none;
}

.blog-card__title a:hover {
  color: #fff;
}

.blog-card__excerpt {
  flex: 1;
  margin: 0 0 18px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #c6d7ff;
  max-width: none;
}

.blog-card__more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.95rem;
}

.blog-card__more a {
  color: #4f7cff;
  text-decoration: none;
}

.blog-card__more a:hover {
  color: #7a9fff;
  text-decoration: underline;
}

.blog-card__badge-wrap {
  margin: 0 0 10px;
}

.blog-hero__eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8a9bc4;
}

.tag--link {
  text-decoration: none;
  color: #cfe0ff;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.tag--link:hover {
  color: #fff;
  background: rgba(79, 124, 255, 0.35);
  border-color: rgba(79, 124, 255, 0.45);
}

.blog-post__category {
  margin: 0 0 12px;
}

.blog-post__title {
  margin-bottom: 0.35em;
}

.blog-post__byline {
  margin: 0 0 8px;
  font-size: 0.98rem;
  color: #c6d7ff;
  line-height: 1.5;
}

.blog-post__sep {
  margin: 0 0.35em;
  color: #7d8aad;
}

.blog-post__updated {
  margin: 0 0 20px;
  font-size: 0.92rem;
}

.blog-internal-links {
  margin-top: 32px;
  text-align: left;
}

.blog-internal-links__title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  font-weight: 800;
}

.blog-internal-links__list {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.75;
  color: #d0daf5;
}

.blog-internal-links__list a {
  color: #8db1ff;
  font-weight: 700;
  text-decoration: none;
}

.blog-internal-links__list a:hover {
  color: #fff;
  text-decoration: underline;
}

.blog-empty__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

/* Blog post HTML body */
.blog-content {
  margin-top: 16px;
  white-space: normal;
  text-align: left;
  color: var(--color-text-soft);
}

.blog-content > *:first-child {
  margin-top: 0;
}

.blog-content h2 {
  margin-top: 30px;
  margin-bottom: 0.5em;
  font-size: 1.35rem;
  font-weight: 700;
  color: #e8eefc;
  line-height: 1.3;
}

.blog-content h2:first-child {
  margin-top: 0;
}

.blog-content h3 {
  margin-top: 1.25em;
  margin-bottom: 0.4em;
  font-size: 1.12rem;
  font-weight: 700;
  color: #e0e8fc;
  line-height: 1.35;
}

.blog-content p {
  margin: 0 0 1em;
  line-height: 1.7;
  max-width: none;
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 1em 20px;
  padding-left: 1em;
  line-height: 1.7;
}

.blog-content li {
  margin-bottom: 0.35em;
}

.blog-content li:last-child {
  margin-bottom: 0;
}

.blog-content a {
  color: #8db1ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.blog-content a:hover {
  color: #fff;
}

.blog-content strong {
  font-weight: 700;
  color: #f0f4ff;
}

.blog-content em {
  font-style: italic;
}

/* ----- Blog & articles (home & legacy) ----- */
.article-grid {
  margin-top: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 900px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
}

.article-item p {
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #9fb0df;
  font-size: 0.85rem;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(79, 124, 255, 0.2);
  color: #cfe0ff;
  border: 1px solid rgba(79, 124, 255, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
}

.article-item a {
  color: #b9ceff;
  text-decoration: none;
  font-weight: 700;
}

.article-item a:hover {
  color: #fff;
}

.internal-inline-link {
  margin: 22px auto 0;
  max-width: var(--prose-max);
}

.internal-inline-link a {
  color: #b9ceff;
  text-decoration: none;
  font-weight: 700;
}

.internal-inline-link a:hover {
  color: #fff;
}

.content-block--latest {
  margin-top: calc(var(--section-gap) + 20px);
}

.blog-cta-wrap {
  text-align: center;
  margin-top: 32px;
}

.btn--inline {
  width: auto;
  display: inline-flex;
  margin-top: 0;
  min-width: min(100%, 280px);
  padding: 16px 32px;
  border-radius: 12px;
}

.article-item.soft-panel {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-item.soft-panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ----- CPM page ----- */
.site-main__inner:has(.cpm-page) {
  padding-top: 4px;
  padding-bottom: 8px;
}

.cpm-trust-bar {
  max-width: var(--prose-max);
  margin: 0 auto 20px;
  padding: 14px var(--block-pad);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

.cpm-trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: center;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: #c8d8ff;
}

@media (max-width: 560px) {
  .cpm-trust-list {
    flex-direction: column;
    gap: 8px;
  }
}

.cpm-trust-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: #7dffb2;
  vertical-align: middle;
}

.cpm-intro-note {
  margin: 12px auto 8px;
  max-width: var(--prose-max);
  padding: 6px 0 10px;
  font-size: 0.98rem;
  line-height: 1.75;
  color: #aab7df;
}

.cpm-page .cpm-hero {
  padding-top: 0;
}

.cpm-hero {
  text-align: left;
  justify-items: stretch;
}

.cpm-tool-box {
  max-width: var(--prose-max);
  padding: var(--block-pad);
}

.cpm-result-panel {
  margin-top: 20px;
  padding: 22px var(--block-pad);
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.cpm-result-panel--low {
  background: linear-gradient(165deg, rgba(79, 124, 255, 0.2), rgba(125, 255, 178, 0.1));
  border-color: rgba(125, 255, 178, 0.3);
}

.cpm-result-panel--average {
  background: linear-gradient(165deg, rgba(79, 124, 255, 0.22), rgba(255, 200, 120, 0.08));
  border-color: rgba(158, 184, 255, 0.3);
}

.cpm-result-panel--high {
  background: linear-gradient(165deg, rgba(255, 120, 120, 0.1), rgba(79, 124, 255, 0.14));
  border-color: rgba(255, 160, 160, 0.22);
}

.cpm-tier-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.cpm-result-detail {
  margin: 12px 0 8px;
  color: #e8f0ff;
  line-height: 1.55;
  font-size: 0.98rem;
  max-width: none;
}

.cpm-result-us {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: #c8dcff;
  line-height: 1.55;
  max-width: none;
}

.cpm-result-formula {
  margin: 0;
  font-size: 0.85rem;
}

.cpm-result-value {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  color: #c8ffe8;
  line-height: 1.1;
}

.cpm-internal-flow {
  margin: 14px auto 32px;
  max-width: var(--prose-max);
  padding: 12px 0;
  font-size: 1rem;
  line-height: 1.75;
  color: #c6d7ff;
}

.cpm-internal-flow a {
  color: #b9ceff;
  font-weight: 700;
  text-decoration: none;
}

.cpm-internal-flow a:hover {
  color: #fff;
}

.cpm-prose {
  max-width: var(--prose-max);
  margin-left: auto;
  margin-right: auto;
}

.cpm-prose p,
.cpm-prose li {
  line-height: 1.75;
}

.cpm-page > section.content-block {
  margin-top: var(--section-gap);
}

.cpm-page > section.hero + p + p + section.content-block {
  margin-top: 48px;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

@media (max-width: 900px) {
  .benchmark-grid {
    grid-template-columns: 1fr;
  }
}

.benchmark-card {
  padding: var(--block-pad);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

.benchmark-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
}

.benchmark-card p {
  margin: 0;
  font-size: 0.95rem;
  color: #d0dff8;
  line-height: 1.75;
  max-width: none;
}

.cpm-formula-block {
  max-width: var(--prose-max);
  margin-left: auto;
  margin-right: auto;
}

.cpm-faq-section {
  padding-bottom: 12px;
}

.cpm-bottom-cta {
  margin-top: 32px;
  text-align: center;
}

.cpm-bottom-cta .btn {
  width: auto;
  display: inline-flex;
  padding: 16px 24px;
}

.step-list {
  margin: 0 0 20px;
  padding-left: 1.2rem;
  color: #d9e5ff;
  line-height: 1.8;
}

.step-list li {
  margin-bottom: 10px;
}

.cpm-result-unit {
  font-size: 1.05rem;
  font-weight: 700;
  color: #c8f5d8;
  margin-left: 4px;
}

/* ----- Admin standalone pages (use .nav in local header) ----- */
.site-header.admin-local .nav,
.admin-page-header .nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}

.site-header.admin-local .nav a,
.admin-page-header .nav a {
  color: #d0ddff;
  text-decoration: none;
  font-weight: 600;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
}

.site-header.admin-local .nav a:hover,
.admin-page-header .nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.admin-setup-alert {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 22px 22px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 193, 94, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 193, 94, 0.28);
  box-shadow: var(--shadow-sm);
}

.admin-setup-alert__icon {
  flex: 0 0 auto;
  color: #ffc46e;
}

.admin-setup-alert__icon svg {
  display: block;
}

.admin-setup-alert__body {
  min-width: 0;
}

.admin-setup-alert__title {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.admin-setup-alert__lead {
  margin: 0 0 16px;
  font-size: 0.98rem;
  line-height: 1.65;
  color: #e4e9f7;
  max-width: 52ch;
}

.admin-setup-alert__steps {
  margin: 0 0 18px;
  padding-left: 1.35rem;
  color: #d0daf5;
  line-height: 1.7;
  font-size: 0.95rem;
}

.admin-setup-alert__steps li {
  margin-bottom: 8px;
}

.admin-setup-alert__steps li:last-child {
  margin-bottom: 0;
}

.admin-setup-alert__code {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  color: #ffe8c8;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.admin-setup-alert__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.admin-setup-alert__actions .btn {
  margin-top: 0;
}

@media (max-width: 560px) {
  .admin-setup-alert {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .admin-setup-alert__lead {
    max-width: none;
  }

  .admin-setup-alert__steps {
    text-align: left;
  }

  .admin-setup-alert__actions {
    justify-content: center;
  }
}

/* ----- About page ----- */
.about-page {
  max-width: 800px;
  width: 100%;
  text-align: left;
}

.about-page h1 {
  margin-bottom: 0.4em;
}

.about-page h2 {
  margin-top: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
}

.about-page p,
.about-page li {
  max-width: none;
  color: var(--color-text-soft);
}

.about-page__lead {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25em;
}

.about-page__summary {
  margin: 0;
  padding-left: 1.25rem;
  list-style: disc;
  color: #d0dff8;
  line-height: 1.75;
}

.about-page__summary li {
  margin-bottom: 0.5em;
}

.about-section {
  margin-top: var(--section-gap);
}

.about-page__hero.about-section {
  margin-top: 0;
}

.about-page__list {
  margin: 0.75em 0 0;
  padding-left: 1.25rem;
  list-style: disc;
  line-height: 1.75;
}

.about-page__list li {
  margin-bottom: 0.65em;
}

.about-page__list li strong {
  color: var(--color-text);
  font-weight: 700;
}

.about-section--emphasis {
  padding: var(--block-pad);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--color-border-soft);
  box-shadow: var(--shadow-sm);
}

.about-section--transparency {
  padding: var(--block-pad);
  border-radius: var(--radius);
  background: rgba(79, 124, 255, 0.06);
  border: 1px solid rgba(79, 124, 255, 0.2);
}

.about-section--transparency h2 {
  margin-bottom: 0.35em;
}

.about-page__cta {
  padding-top: 8px;
}

.about-page__cta-lead {
  margin-bottom: 1em;
}

.about-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e8eefc;
  box-shadow: none;
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 720px) {
  .about-page__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .about-page__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ----- Contact page ----- */
.contact-page {
  width: 100%;
  text-align: left;
}

.contact-page__hero {
  max-width: 800px;
  margin-bottom: 28px;
}

.contact-page__hero h1 {
  margin-bottom: 0.4em;
}

.contact-page__lead {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text-soft);
  max-width: none;
}

.contact-page__methods {
  max-width: 800px;
  margin-bottom: 32px;
}

.contact-page__h2 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin-bottom: 0.5em;
}

.contact-page__method-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  line-height: 1.75;
}

.contact-page__method-list li {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-soft);
  max-width: none;
}

.contact-page__method-list a {
  color: #b9ceff;
  font-weight: 700;
  text-decoration: none;
  word-break: break-all;
}

.contact-page__method-list a:hover {
  color: #fff;
  text-decoration: underline;
}

.contact-form-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto 28px;
  width: 100%;
}

.contact-flash {
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.98rem;
  line-height: 1.55;
}

.contact-flash--success {
  background: rgba(125, 255, 178, 0.12);
  border: 1px solid rgba(125, 255, 178, 0.35);
  color: #c8ffe8;
}

.contact-flash--error {
  background: rgba(255, 123, 123, 0.12);
  border: 1px solid rgba(255, 123, 123, 0.35);
  color: #ffc4c4;
}

.contact-form .form-field textarea.form-input {
  min-height: 160px;
}

.contact-form__submit {
  width: 100%;
}

.contact-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-page__trust {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

/* ----- Privacy page ----- */
.privacy-page {
  max-width: 800px;
  width: 100%;
  text-align: left;
}

.privacy-page__intro h1 {
  margin-bottom: 0.35em;
}

.privacy-page__intro > p {
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.75;
}

.privacy-page__intro a {
  color: #b9ceff;
  font-weight: 600;
}

.privacy-page__meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.privacy-section {
  margin-top: var(--section-gap);
}

.privacy-section h2 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  margin-bottom: 0.5em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--color-border-soft);
}

.privacy-section h3 {
  font-size: 1.05rem;
  margin-top: 1.25em;
  margin-bottom: 0.4em;
}

.privacy-section p,
.privacy-section li {
  max-width: none;
  color: var(--color-text-soft);
  line-height: 1.75;
}

.privacy-page__list {
  margin: 0.75em 0 1em;
  padding-left: 1.25rem;
  line-height: 1.75;
}

.privacy-page__list li {
  margin-bottom: 0.65em;
}

.privacy-section a {
  color: #b9ceff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-section a:hover {
  color: #fff;
}

.privacy-section--highlight {
  padding: var(--block-pad);
  border-radius: var(--radius);
  background: rgba(79, 124, 255, 0.07);
  border: 1px solid rgba(79, 124, 255, 0.22);
  margin-top: var(--section-gap);
}

.privacy-section--highlight h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.65em;
}
