/* Scoped styles for /use-cases/custom-vocabulary/. Uses --type-* tokens only. */

.cv-page {
  overflow-wrap: break-word;
}

.cv-page main > section {
  width: 100%;
  max-width: none;
  margin: 0;
}

.cv-page [hidden] {
  display: none !important;
}

.cv-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

/* Hero */
.cv-hero {
  padding: 122px 0 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.cv-hero-copy {
  max-width: 820px;
}

.cv-hero h1 {
  margin: 12px 0 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-display);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.cv-hero-lead {
  margin: 18px 0 0;
  max-width: 64ch;
  color: var(--ink-muted);
  font-size: var(--type-body-large);
  line-height: 1.6;
}

.cv-hero .hero-actions {
  margin-top: 26px;
}

.cv-trial-note {
  margin: 14px 0 0;
  color: var(--ink-dim);
  font-size: var(--type-caption);
  line-height: 1.5;
}

.cv-text-link {
  color: var(--brand-strong);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(114, 70, 44, 0.42);
  text-underline-offset: 3px;
}

.cv-text-link:hover {
  text-decoration-color: var(--brand-strong);
}

.quiet-product-link {
  color: inherit;
  text-decoration: none;
}

.quiet-product-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.quiet-product-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.cv-summary {
  margin-top: 26px;
  padding: 20px 24px;
  border-left: 3px solid #55786e;
  border-radius: 12px;
  background: #eef3f1;
}

.cv-summary-label {
  margin: 0 0 10px;
  color: #365c55;
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cv-summary ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
}

.cv-summary li {
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.6;
}

/* Sections */
.cv-section {
  padding: 68px 0;
}

.cv-section-surface {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cv-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.cv-heading h2 {
  margin: 10px 0 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-section);
  line-height: 1.16;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.cv-heading p:not(.eyebrow) {
  margin: 14px 0 0;
  color: var(--ink-muted);
  font-size: var(--type-body-large);
  line-height: 1.6;
}

/* Interactive Polish & Custom Vocabulary Demo */
.cv-demo {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  display: grid;
  gap: 20px;
}

.cv-demo-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cv-demo-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.cv-demo-group-label {
  margin-right: 4px;
  color: var(--ink-dim);
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.cv-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: var(--type-caption);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.cv-pill-btn:hover {
  color: var(--ink);
  border-color: var(--brand-border);
}

.cv-pill-btn[aria-pressed="true"] {
  background: rgba(114, 70, 44, 0.11);
  border-color: rgba(114, 70, 44, 0.34);
  color: var(--brand-strong);
}

.cv-vocab-toggle[aria-pressed="true"] {
  background: #e6f3ec;
  border-color: rgba(40, 114, 79, 0.36);
  color: #1f5c3e;
}

.cv-pill-btn:focus-visible,
.cv-text-link:focus-visible,
.cv-card-link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

.cv-demo-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 20px;
  align-items: stretch;
}

.cv-demo-pane {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: #faf8f4;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cv-demo-pane-out {
  background: var(--surface);
  border-color: var(--brand-border);
  box-shadow: 0 8px 22px rgba(40, 32, 24, 0.06);
}

.cv-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cv-pane-label {
  margin: 0;
  color: #365c55;
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cv-pane-meta {
  color: var(--ink-dim);
  font-size: var(--type-caption);
}

.cv-demo-quote {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body-large);
  line-height: 1.65;
}

.cv-demo-pane:not(.cv-demo-pane-out) .cv-demo-quote {
  color: var(--ink-muted);
}

.cv-demo-note {
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.55;
}

.cv-demo-note strong {
  color: var(--ink);
}

.cv-mark-term {
  padding: 1px 5px;
  border-radius: 4px;
  background: #e6f3ec;
  color: #1f5c3e;
  font-weight: 600;
}

.cv-mark-miss {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(185, 86, 62, 0.12);
  color: #8a4332;
  text-decoration: underline wavy rgba(185, 86, 62, 0.55);
  text-underline-offset: 3px;
}

.cv-mark-keep {
  padding: 1px 5px;
  border-radius: 4px;
  background: #fbf2df;
  color: var(--brand-strong);
  font-weight: 500;
}

.cv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  transition: opacity 160ms ease;
}

.cv-demo[data-voice-vocab="off"] .cv-chips {
  opacity: 0.42;
}

.cv-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: var(--type-caption);
}

.cv-chip span {
  color: var(--ink-dim);
  font-family: Inter, sans-serif;
}

.cv-disclosure {
  margin: 0;
  color: var(--ink-dim);
  font-size: var(--type-caption);
  line-height: 1.5;
}

/* Feature cards */
.cv-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

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

.cv-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.cv-section-surface .cv-card {
  background: var(--paper);
}

.cv-card-tag {
  margin: 0;
  color: #365c55;
  font-size: var(--type-caption);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cv-card h3 {
  margin: 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-small);
  line-height: 1.25;
  text-wrap: balance;
}

.cv-card p:not(.cv-card-tag) {
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

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

.cv-card ul,
.cv-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.6;
}

.cv-card li strong {
  color: var(--ink);
}

.cv-card-link {
  display: inline;
  align-self: flex-start;
  margin-top: auto;
  padding-top: 8px;
  color: var(--brand-strong);
  font-size: var(--type-body);
  font-weight: 600;
  text-decoration: none;
}

.cv-card-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Illustration banner */
.cv-banner {
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: #f3ede4;
}

.cv-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.cv-banner figcaption {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.5;
}

/* Callout */
.cv-callout {
  margin-top: 24px;
  padding: 18px 22px;
  border-left: 3px solid #55786e;
  border-radius: 10px;
  background: #eef3f1;
}

.cv-callout p {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body);
  line-height: 1.65;
}

/* Comparison table */
.cv-table-wrap {
  margin-top: 24px;
  overflow-x: auto;
  border-top: 2px solid #55786e;
  border-bottom: 1px solid #d7dedb;
  border-radius: 8px;
  background: var(--surface);
}

.cv-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
  text-align: left;
  font-size: var(--type-body);
}

.cv-table th,
.cv-table td {
  padding: 15px 18px;
  border-top: 1px solid #e3e7e5;
  vertical-align: top;
  line-height: 1.6;
}

.cv-table thead th {
  border-top: 0;
  background: #f4f7f5;
  color: #254c43;
  font-weight: 650;
}

.cv-table tbody th {
  color: var(--ink);
  font-weight: 600;
  width: 24%;
}

.cv-table td {
  color: var(--ink-muted);
}

.cv-table td strong {
  color: var(--ink);
}

/* FAQ */
.cv-faq-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
}

.cv-faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  transition: border-color 160ms ease;
}

.cv-faq-item[open] {
  border-color: var(--brand-border);
}

.cv-faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 54px;
  padding: 16px 22px;
  color: var(--ink);
  font-size: var(--type-body-large);
  font-weight: 600;
  cursor: pointer;
}

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

.cv-faq-item summary::after {
  content: "+";
  flex: none;
  color: var(--brand);
  font-size: var(--type-title-small);
  font-weight: 500;
  line-height: 1;
}

.cv-faq-item[open] summary::after {
  content: "−";
}

.cv-faq-item summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-panel);
}

.cv-faq-item p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

.cv-faq-item p strong {
  color: var(--ink);
}

/* Bottom CTA */
.cv-cta-card {
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  display: grid;
  gap: 14px;
}

.cv-cta-card h2 {
  margin: 0;
  color: var(--ink);
  font-family: "Hanken Grotesk", Inter, sans-serif;
  font-size: var(--type-title-section);
  line-height: 1.16;
  letter-spacing: -0.025em;
  max-width: 24ch;
}

.cv-cta-card p:not(.eyebrow) {
  margin: 0;
  max-width: 64ch;
  color: var(--ink-muted);
  font-size: var(--type-body);
  line-height: 1.65;
}

.cv-cta-card .hero-actions {
  margin-top: 8px;
}

.cv-related-links {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: var(--type-caption);
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 1020px) {
  .cv-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cv-demo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .cv-inner {
    width: calc(100% - 32px);
  }

  .cv-hero {
    padding: 104px 0 36px;
  }

  .cv-hero h1 {
    font-size: var(--type-title-section);
  }

  .cv-heading h2,
  .cv-cta-card h2 {
    font-size: var(--type-title-small);
  }

  .cv-section {
    padding: 48px 0;
  }

  .cv-grid-3,
  .cv-grid-2 {
    grid-template-columns: 1fr;
  }

  .cv-demo {
    padding: 18px;
  }

  .cv-demo-pane {
    padding: 18px;
  }

  .cv-card {
    padding: 22px;
  }

  .cv-cta-card {
    padding: 26px 22px;
  }

  .cv-faq-item summary {
    padding: 14px 18px;
    font-size: var(--type-body);
  }

  .cv-faq-item p {
    padding: 0 18px 18px;
  }
}
