/* ==========================================================================
   Agjensi SEO — components.css
   Reusable components. Mobile-first: breakpoints live in responsive.css.
   ========================================================================== */

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  transition: transform 0.2s var(--ease);
}

.btn:hover svg {
  transform: translateX(3px);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--ink);
  color: #fff;
}

.btn--primary:hover {
  background: #000;
}

.btn--accent {
  background: var(--accent);
  color: var(--ink);
}

.btn--accent:hover {
  background: #3bf08f;
}

.btn--ghost {
  background: var(--bg);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn--ghost-dark {
  background: transparent;
  border-color: #4a4a48;
  color: #fff;
}

.btn--ghost-dark:hover {
  border-color: #fff;
}

.btn--sm {
  min-height: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Chips / tags ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

.chip--mono {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
}

.chip svg {
  width: 15px;
  height: 15px;
  color: var(--accent-ink);
}

.section--dark .chip {
  background: #1b1b1b;
  border-color: var(--line-dark);
  color: #fff;
}

button.chip {
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

button.chip:hover {
  border-color: var(--ink);
}

button.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ---------- Cards ---------- */

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}

a.card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card__num {
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.card__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.card__text {
  margin-top: 0.5rem;
  font-size: var(--fs-sm);
  line-height: 1.6;
  color: var(--muted);
}

.card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

.card__more svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}

a.card:hover .card__more svg {
  transform: translateX(3px);
}

.card--flat {
  background: var(--bg-2);
  border-color: transparent;
}

.card--compact {
  flex-direction: row;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
}

.card--compact .card__icon {
  margin: 0;
  flex: none;
}

.card--compact .card__title {
  font-size: 1rem;
}

.card--compact .card__arrow {
  margin-left: auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}

a.card--compact:hover .card__arrow {
  color: var(--ink);
  transform: translateX(3px);
}

/* Problem cards */

.issue-list {
  list-style: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
}

.issue-list li {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}

.issue-list li + li {
  margin-top: 0.375rem;
}

.issue-list li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bad);
  transform: translateY(-1px);
}

/* ---------- Check list ---------- */

.checks {
  list-style: none;
}

.checks li {
  position: relative;
  padding-left: 1.875rem;
}

.checks li + li {
  margin-top: 0.75rem;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.checks--plain li::before {
  background-color: var(--bg-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) clamp(3.5rem, 3rem + 4vw, 6.5rem);
  background:
    radial-gradient(60% 50% at 85% 0%, rgba(34, 226, 122, 0.1), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}

.hero__grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: var(--fs-h1);
}

.hero .lead {
  max-width: 34rem;
  margin-top: 1.5rem;
}

.hero__note {
  margin-top: 1.25rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* Page hero (inner pages) */

.page-hero {
  padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) clamp(3rem, 2.5rem + 3vw, 5rem);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(50% 60% at 90% 0%, rgba(34, 226, 122, 0.08), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}

.page-hero__grid {
  display: grid;
  gap: 2.5rem;
  align-items: end;
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.page-hero .lead {
  max-width: 40rem;
  margin-top: 1.25rem;
}

/* Breadcrumb */

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  list-style: none;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: var(--line-strong);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.breadcrumb [aria-current] {
  color: var(--ink);
}

/* Scope panel (inner page hero) */

.panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.panel__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.panel__dots {
  display: inline-flex;
  gap: 5px;
  margin-right: 0.375rem;
}

.panel__dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}

.panel__list {
  list-style: none;
  padding: 0.5rem 1rem;
  font-size: var(--fs-sm);
}

.panel__list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
}

.panel__list li + li {
  border-top: 1px solid var(--line);
}

.panel__list span:first-child {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.panel__list span:nth-child(2) {
  font-weight: 500;
  color: var(--ink);
}

.panel__list span:last-child {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Dashboard (hero visual) ---------- */

.dash {
  margin: 0;
  position: relative;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.dash__body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
}

.dash__main {
  padding: 1.125rem;
  background: var(--ink);
  border-radius: var(--r-lg);
  color: #fff;
}

.dash__label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash__main .dash__label {
  color: #a4a4a0;
}

.dash__value {
  display: block;
  margin-top: 0.375rem;
  font-size: 1.75rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.dash__main .dash__value {
  font-size: clamp(2.25rem, 1.8rem + 2vw, 3rem);
  color: var(--accent);
}

.dash__bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 84px;
  margin-top: 1.25rem;
}

.dash__bars i {
  flex: 1;
  height: var(--h);
  min-height: 4px;
  background: #3a3a38;
  border-radius: 3px 3px 0 0;
  transform-origin: bottom;
  animation: bar-grow 0.9s var(--ease) both;
  animation-delay: calc(var(--i) * 45ms);
}

.dash__bars i:nth-last-child(-n + 3) {
  background: var(--accent);
}

@keyframes bar-grow {
  from {
    transform: scaleY(0.08);
  }
}

.dash__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.dash__tile {
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.dash__meter {
  height: 6px;
  margin-top: 0.75rem;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.dash__meter i {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}

.dash__foot {
  padding: 0 1rem 0.875rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--muted);
}

/* ---------- Trust band ---------- */

.trust {
  padding-block: clamp(2.5rem, 2rem + 2vw, 4rem);
  border-block: 1px solid var(--line);
  background: var(--bg-2);
}

.trust__title {
  max-width: 30ch;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  line-height: 1.25;
}

.trust__grid {
  display: grid;
  gap: 1.75rem;
}

.trust__group + .trust__group {
  margin-top: 1rem;
}

.trust__label {
  margin-bottom: 0.625rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Forms ---------- */

.form-card {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  color: var(--text);
}

.section--dark .form-card {
  border-color: transparent;
  box-shadow: 0 0 0 1px var(--line-dark), 0 40px 80px -30px rgba(34, 226, 122, 0.25);
}

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.375rem;
}

.field label,
.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}

.field .optional {
  font-weight: 400;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.6875rem 0.875rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

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

.textarea--code {
  min-height: 220px;
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 18px;
}

.input::placeholder,
.textarea::placeholder {
  color: #8f8f8b;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #a9a9a5;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(34, 226, 122, 0.35);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.625rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.field--check input {
  width: 18px;
  height: 18px;
  margin: 0.15em 0 0;
  accent-color: var(--ink);
}

.field--check label {
  font-size: inherit;
  font-weight: 400;
  color: inherit;
}

.field--hp {
  position: absolute;
  left: -9999px;
}

.form__note {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.form__status {
  padding: 0.75rem 1rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.form__status[data-state="error"] {
  background: var(--bad-soft);
  color: var(--bad);
}

.form__status:empty {
  display: none;
}

/* ---------- Crawl pipeline diagram ---------- */

.pipeline {
  display: grid;
  gap: 2rem;
}

.pipeline__flow {
  list-style: none;
  counter-reset: stage;
}

.pipeline__stage {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0 1rem;
  padding-bottom: 1.25rem;
  counter-increment: stage;
}

.pipeline__stage::before {
  content: counter(stage, decimal-leading-zero);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  grid-row: span 2;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink);
  position: relative;
  z-index: 1;
}

.pipeline__stage::after {
  content: "";
  position: absolute;
  left: 21.5px;
  top: 44px;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(var(--line-strong) 0 4px, transparent 4px 8px);
}

.pipeline__stage:last-child {
  padding-bottom: 0;
}

.pipeline__stage:last-child::after {
  display: none;
}

.pipeline__stage:first-child::before {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.pipeline__stage:last-child::before {
  background: var(--accent);
  border-color: var(--accent);
}

.pipeline__stage strong {
  align-self: end;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.pipeline__stage span {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.signals {
  display: grid;
  gap: 0.625rem;
  list-style: none;
  align-content: start;
}

.signal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.125rem 1rem;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.signal code {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.signal em {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.signal span {
  grid-column: 1 / -1;
  font-size: var(--fs-xs);
  color: var(--muted);
}

/* ---------- Funnel ---------- */

.funnel {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.funnel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: var(--w);
  min-width: min(100%, 15rem);
  margin-inline: auto;
  padding: 0.875rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-weight: 600;
  color: var(--ink);
}

.funnel li span {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}

.funnel li:last-child {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.funnel li:last-child span {
  color: var(--accent);
}

.pillars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem 1.25rem;
  list-style: none;
  margin-top: 2rem;
}

.pillars strong {
  display: block;
  color: var(--ink);
}

.pillars span {
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- Timeline (process) ---------- */

.timeline {
  display: grid;
  gap: 1rem;
  list-style: none;
}

.timeline__step {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.timeline__num {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--accent-ink);
}

.timeline__num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.timeline__step p {
  margin-top: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* ---------- Tabs (90-day roadmap) ---------- */

.tabs__list {
  display: grid;
  gap: 0.5rem;
}

.tab {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-align: left;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.tab:hover {
  border-color: var(--line-strong);
}

.tab__days {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.tab__name {
  display: block;
  margin-top: 0.125rem;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
}

.tab[aria-selected="true"] .tab__name {
  color: #fff;
}

.tab[aria-selected="true"] .tab__days {
  color: var(--accent);
}

.tabs__panel {
  margin-top: 1rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.tabs__panel h3 {
  margin-bottom: 0.5rem;
}

.tabs__panel > p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.task-list {
  display: grid;
  gap: 0.75rem 2rem;
}

/* ---------- FAQ ---------- */

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 0;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform 0.25s var(--ease), background-color 0.2s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
  background-color: var(--accent);
  border-color: var(--accent);
}

.faq summary:hover::after {
  border-color: var(--ink);
}

.faq__answer {
  max-width: 68ch;
  padding-bottom: 1.5rem;
  color: var(--muted);
}

/* ---------- CTA band ---------- */

.cta-band {
  position: relative;
  padding-block: var(--section);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(#1f1f1f 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, #1f1f1f 1px, transparent 1px) 0 0 / 56px 100%;
  -webkit-mask-image: radial-gradient(70% 90% at 50% 100%, #000, transparent 75%);
  mask-image: radial-gradient(70% 90% at 50% 100%, #000, transparent 75%);
  pointer-events: none;
}

.cta-band__inner {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  max-width: 36rem;
  margin: 1.25rem auto 0;
  font-size: var(--fs-lead);
  color: var(--on-dark-muted);
}

.cta-band .actions {
  justify-content: center;
}

/* ---------- Editorial (blog) ---------- */

.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  border-top: 1px solid var(--ink);
  color: inherit;
  text-decoration: none;
}

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.post-card__title {
  font-size: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  transition: color 0.2s var(--ease);
}

.post-card:hover .post-card__title {
  color: var(--accent-ink);
}

.post-card__text {
  margin-top: 0.75rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.post-card--lead .post-card__title {
  font-size: clamp(1.75rem, 1.4rem + 1.8vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.post-card--lead .post-card__text {
  font-size: var(--fs-lead);
  max-width: 46rem;
}

.filter-bar {
  margin-bottom: 2rem;
}

.empty {
  padding: 2rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  text-align: center;
  color: var(--muted);
}

.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.article__body {
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.7;
}

.callout {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
}

.callout h2,
.callout h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.callout p {
  color: var(--muted);
}

/* ---------- Glossary ---------- */

.glossary-search {
  position: sticky;
  top: calc(var(--header-h) + 0.5rem);
  z-index: 5;
  margin-bottom: 2rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.glossary-search__count {
  margin-top: 0.5rem;
  padding-inline: 0.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.glossary {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.term {
  display: grid;
  gap: 0.5rem 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
}

.term dt {
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.term dd {
  margin: 0;
  color: var(--muted);
}

.term dd a {
  color: var(--accent-ink);
  font-weight: 500;
}

/* ---------- Case studies ---------- */

.case {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--bg);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}

.case__grid {
  display: grid;
  gap: 1rem 2rem;
  margin: 1.5rem 0 0;
}

.case__grid dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.case__grid dd {
  margin: 0.25rem 0 0;
}

/* ---------- Tools ---------- */

.tool {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

.tool__out {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  min-width: 0;
}

.tool__out h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.serp {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-family: Arial, Helvetica, sans-serif;
  overflow: hidden;
}

.serp__site {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.serp__favicon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: #f1f3f4;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #5f6368;
}

.serp__name {
  font-size: 14px;
  line-height: 1.3;
  color: #202124;
}

.serp__url {
  font-size: 12px;
  line-height: 1.3;
  color: #4d5156;
  overflow-wrap: anywhere;
}

.serp__title {
  font-size: 20px;
  line-height: 1.3;
  color: #1a0dab;
  overflow-wrap: anywhere;
}

.serp__desc {
  margin-top: 0.25rem;
  font-size: 14px;
  line-height: 1.58;
  color: #4d5156;
  overflow-wrap: anywhere;
}

.meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge--ok {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.badge--warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge--bad {
  background: var(--bad-soft);
  color: var(--bad);
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.stat {
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.stat__label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.results {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.result {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.75rem;
  align-items: baseline;
  padding: 0.875rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
}

.result strong {
  color: var(--ink);
}

.result span:last-child {
  grid-column: 2;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.kw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.kw-table th,
.kw-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.kw-table th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.kw-table td:not(:first-child),
.kw-table th:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- Contact ---------- */

.contact-list {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.contact-list svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--accent-ink);
}

.contact-list small {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-list a {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Misc ---------- */

.note {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  color: var(--muted);
}

.section--dark .note {
  background: #1b1b1b;
  border-color: var(--line-dark);
  color: var(--on-dark-muted);
}

.section--dark .card {
  background: #1b1b1b;
  border-color: var(--line-dark);
}

.section--dark .card__title {
  color: #fff;
}

.section--dark .card__text {
  color: var(--on-dark-muted);
}

.section--dark .card__icon {
  background: #262626;
  border-color: #333;
  color: var(--accent);
}

.error-page {
  display: grid;
  place-items: center;
  min-height: 70vh;
  padding-block: var(--section);
  text-align: center;
}

.error-page__code {
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--muted);
}

.error-page .actions {
  justify-content: center;
}

.link-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.link-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.125rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}

.link-list a:hover {
  border-color: var(--ink);
}

.link-list svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
}

.prose > .note:first-child {
  margin-top: 0;
  margin-bottom: 2rem;
}

.mt-2 {
  margin-top: 2rem;
}

.tool__sub {
  margin-top: 1.5rem;
}

.page-hero__block {
  margin-top: clamp(2rem, 1.500rem + 2vw, 3.500rem);
}

.page-hero__block .tag {
  margin: 0 0 1rem;
}

.case__grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.trust__label + .chips,
.trust__label + .signals,
.trust__label + .link-list,
.trust__label + .contact-list {
  margin-top: 0;
}

h2.trust__label {
  font-weight: 500;
  line-height: 1.5;
}

.lead + .trust__label {
  margin-top: 2rem;
}

/* Data-driven sizes for the hero dashboard and the funnel (kept out of the HTML) */
.dash__bars i:nth-child(1) { --h: 22%; --i: 1; }
.dash__bars i:nth-child(2) { --h: 28%; --i: 2; }
.dash__bars i:nth-child(3) { --h: 25%; --i: 3; }
.dash__bars i:nth-child(4) { --h: 36%; --i: 4; }
.dash__bars i:nth-child(5) { --h: 42%; --i: 5; }
.dash__bars i:nth-child(6) { --h: 40%; --i: 6; }
.dash__bars i:nth-child(7) { --h: 54%; --i: 7; }
.dash__bars i:nth-child(8) { --h: 60%; --i: 8; }
.dash__bars i:nth-child(9) { --h: 68%; --i: 9; }
.dash__bars i:nth-child(10) { --h: 76%; --i: 10; }
.dash__bars i:nth-child(11) { --h: 88%; --i: 11; }
.dash__bars i:nth-child(12) { --h: 100%; --i: 12; }

.dash__meter i {
  --w: 92%;
}

.funnel li:nth-child(1) { --w: 100%; }
.funnel li:nth-child(2) { --w: 88%; }
.funnel li:nth-child(3) { --w: 76%; }
.funnel li:nth-child(4) { --w: 64%; }
.funnel li:nth-child(5) { --w: 52%; }
