/*
 * tuning-database.co.uk, v3: the pages written in the editor with the shared
 * "ts-c" markup (/features/ and its pages, /compare/, the language landings).
 * Their words and order stay; this file gives that markup the v3 look. What
 * only decorated the old design is not shown: the labels above headings, the
 * section numbers, the drawings built out of empty boxes, the duplicate
 * breadcrumb. Colours come from tokens.css.
 */

.cluster {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding: var(--sp-6) var(--gutter) 0;
}

/* Not shown in v3. */
.cluster .ts-crumb,
.cluster .ts-eyebrow,
.cluster .ts-detail-meta,
.cluster .ts-illu,
.cluster .ts-mock,
.cluster .ts-flow-num,
.cluster .ts-flow-icon,
.cluster .ts-f2-track,
.cluster .ts-f2-net-row,
.cluster .ts-f2-net-arrow {
  display: none;
}

/* Text */
.cluster h2,
.cluster h3 {
  margin-bottom: var(--sp-3);
}

.cluster h2 {
  font-size: var(--step-3);
}

.cluster p + p,
.cluster p + ul,
.cluster ul + p {
  margin-top: var(--sp-3);
}

.cluster p,
.cluster li {
  color: var(--ink-2);
  max-width: var(--measure);
}

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

.cluster .ts-sub {
  font-size: var(--step-1);
  line-height: 1.5;
}

.cluster .ts-mute {
  color: var(--ink-3);
  font-size: var(--step--1);
}

.cluster .ts-mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.cluster .ts-rule {
  margin: var(--sp-7) 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* The opening statement */
.cluster .ts-hero {
  padding-bottom: var(--sp-6);
}

.cluster .hero-display {
  max-width: 24ch;
  font-size: var(--step-4);
  letter-spacing: -0.02em;
}

.cluster .hero-display em {
  font-style: normal;
  color: var(--accent-ink);
}

.cluster .ts-hero .ts-sub {
  margin-top: var(--sp-4);
}

.cluster .ts-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

/* Buttons in the editor markup, drawn like the v3 buttons. */
.cluster .ts-btn {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 var(--sp-5);
  border: 1px solid var(--btn-2-line);
  border-radius: var(--radius-1);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.cluster .ts-btn:hover {
  background: var(--bg-hover);
}

.cluster .ts-btn-primary {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-ink);
}

.cluster .ts-btn-primary:hover {
  background: color-mix(in srgb, var(--btn-bg) 86%, var(--ink));
}

/* The short version, as a list of plain points. */
.cluster .ts-tldr {
  display: grid;
  gap: var(--sp-3) var(--sp-6);
  margin-block: var(--sp-5) var(--sp-7);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

@media (min-width: 900px) {
  .cluster .ts-tldr {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cluster .ts-tldr-item {
  color: var(--ink-2);
}

/* Sections */
.cluster .ts-section,
.cluster .ts-detail {
  padding-block: var(--sp-7);
  border-top: 1px solid var(--line);
}

.cluster .ts-section-head {
  max-width: 60ch;
  margin-bottom: var(--sp-5);
}

.cluster .ts-detail-split {
  display: grid;
  gap: var(--sp-6);
}

@media (min-width: 900px) {
  .cluster .ts-detail-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .cluster .ts-detail-split:has(> .ts-illu:last-child) {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cluster .ts-feat-list {
  margin: var(--sp-3) 0 0;
  padding: 0;
  list-style: none;
}

.cluster .ts-feat-list li {
  position: relative;
  padding-left: 1.6em;
}

.cluster .ts-feat-list li + li {
  margin-top: var(--sp-2);
}

.cluster .ts-feat-list li::before {
  content: "";
  position: absolute;
  left: 0.15em;
  top: 0.45em;
  width: 0.7em;
  height: 0.38em;
  border-left: 2px solid var(--accent-ink);
  border-bottom: 2px solid var(--accent-ink);
  transform: rotate(-45deg);
}

/* Steps of a flow, in reading order (the numbers are the order). */
.cluster .ts-flow {
  display: grid;
  gap: var(--sp-5);
}

@media (min-width: 900px) {
  .cluster .ts-flow {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

.cluster .ts-flow-step {
  padding-top: var(--sp-3);
  border-top: 2px solid var(--line-strong);
}

.cluster .ts-flow-name {
  color: var(--ink);
  font-weight: 700;
}

.cluster .ts-flow-desc {
  margin-top: var(--sp-1);
}

/* Figures */
.cluster .ts-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--sp-5);
  margin-block: var(--sp-5);
}

.cluster .ts-stat {
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line-strong);
}

.cluster .ts-stat-num {
  color: var(--ink);
  font-size: var(--step-3);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cluster .ts-stat-label {
  color: var(--ink-3);
  font-size: var(--step--1);
}

/* Links to the other feature pages: a list, not a wall of tiles. */
.cluster .ts-feat-grid,
.cluster .ts-f2-groups {
  display: grid;
  gap: 0 var(--sp-6);
  border-top: 1px solid var(--line);
}

@media (min-width: 720px) {
  .cluster .ts-feat-grid,
  .cluster .ts-f2-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cluster .ts-feat-tile {
  display: block;
  padding: var(--sp-4) var(--sp-2);
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  text-decoration: none;
}

.cluster a.ts-feat-tile:hover {
  background: var(--bg-hover);
}

.cluster .ts-feat-tile h3,
.cluster .ts-feat-tile strong {
  color: var(--ink);
}

.cluster .ts-feat-link {
  display: inline-block;
  margin-top: var(--sp-2);
  color: var(--link);
  font-weight: 600;
}

.cluster .ts-f2-group {
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.cluster .ts-f2-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.cluster .ts-f2-chip,
.cluster .ts-f2-node {
  display: inline-flex;
  padding: 2px var(--sp-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  font-size: var(--step--1);
}

/* Comparison tables */
.cluster .ts-table-wrap {
  overflow-x: auto;
  margin-block: var(--sp-5);
}

.cluster .ts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

.cluster .ts-table th,
.cluster .ts-table td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.cluster .ts-table th {
  color: var(--ink-3);
  font-weight: 500;
  border-bottom-color: var(--line-strong);
}

.cluster .ts-row-us {
  background: var(--bg-raised);
  color: var(--ink);
  font-weight: 600;
}

.cluster .ts-cell-good {
  color: var(--ok);
}

.cluster .ts-cell-meh {
  color: var(--ink-3);
}

/* Code */
.cluster .ts-code {
  margin: var(--sp-4) 0;
  padding: var(--sp-4);
  overflow-x: auto;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-1);
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

.cluster .ts-tk-str {
  color: var(--accent-ink);
}

.cluster .ts-tk-attr {
  color: var(--ink);
}

.cluster .ts-tk-com {
  color: var(--ink-3);
}

/* Questions */
.cluster .ts-faq details {
  border-bottom: 1px solid var(--line);
}

.cluster .ts-faq details:first-child {
  border-top: 1px solid var(--line);
}

.cluster .ts-faq summary {
  padding: var(--sp-4) 0;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.cluster .ts-faq-body {
  padding-bottom: var(--sp-4);
}

/* The closing offer and the cross-sell */
.cluster .ts-xsell,
.cluster .ts-bottom {
  margin-block: var(--sp-7);
  padding: var(--sp-6);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-2);
  background: var(--bg-raised);
}

.cluster .ts-bottom .ts-hero-cta,
.cluster .ts-xsell .ts-hero-cta {
  margin-top: var(--sp-4);
}

.cluster .is-done {
  color: var(--ok);
}

.cluster .is-now {
  color: var(--accent-ink);
  font-weight: 600;
}
