/* Shared styles for pages under /products. Loaded after the global stylesheet. */

.breadcrumb {
  padding-top: 1.1rem;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--ink-500);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  color: var(--ink-500);
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
}

.breadcrumb a:hover {
  color: var(--red-800);
}

.breadcrumb [aria-current="page"] {
  color: var(--ink-700);
  font-weight: 600;
}

.product-hero {
  padding: 1.4rem 0 2.4rem;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.product-meta li {
  background: var(--ink-100);
  color: var(--ink-700);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.product-meta b {
  color: var(--ink-900);
}

/* .check-list carries the same treatment and lives in the global stylesheet. */
.a11y-list,
.usage-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.a11y-list li,
.usage-list li {
  position: relative;
  padding-left: 1.75rem;
  color: var(--ink-700);
}

.a11y-list li::before,
.usage-list li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--red-700);
  font-weight: 700;
}

/* ---------------------------------------------------------------------------
   Product page building blocks
   Opt-in classes. Existing product pages are unchanged until they adopt them.
--------------------------------------------------------------------------- */

.section-head .lead {
  margin-bottom: 0;
}

.section-head--sub {
  margin-top: 2.4rem;
}

/* In-page navigation ------------------------------------------------------ */

.page-nav {
  border-top: 1px solid #e5ecf1;
  border-bottom: 1px solid #e5ecf1;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.85rem 0;
}

.page-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.3rem 0.8rem;
  border: 1px solid #dde5eb;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink-700);
  font-size: 0.92rem;
  font-weight: 600;
}

.page-nav a:hover,
.page-nav a:focus-visible {
  color: var(--red-800);
  border-color: var(--red-700);
}

/* Split hero -------------------------------------------------------------- */

.product-hero--split .hero-grid {
  align-items: start;
}

.product-hero--split .hero-copy {
  padding-top: 0.4rem;
}

.product-hero--split .product-meta {
  margin-top: 1.4rem;
}

/* Live preview / demo accordion ------------------------------------------- */

.demo-accordion {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.demo-panel {
  border: 1px solid #efd9dd;
  border-radius: var(--radius-md);
  background: var(--white);
  padding: 0 0.85rem;
}

.demo-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  min-height: 44px;
  padding: 0.6rem 0;
  cursor: pointer;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--ink-900);
  list-style: none;
}

.demo-panel summary::-webkit-details-marker {
  display: none;
}

.demo-panel summary::after {
  content: "\25BE";
  color: var(--red-700);
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.demo-panel[open] summary::after {
  transform: rotate(180deg);
}

.demo-panel p {
  margin: 0 0 0.8rem;
  color: var(--ink-700);
  font-size: 0.95rem;
}

.demo-panel a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
}

.demo-panel a:hover,
.demo-panel a:focus-visible {
  color: var(--red-800);
}

.demo-note {
  margin: 0.9rem 0 0;
  color: var(--ink-500);
  font-size: 0.88rem;
}

/* Product preview components ---------------------------------------------- */

/* Frames size to their own content instead of stretching to the tallest column. */
#preview .grid-2 {
  align-items: start;
}

.explain-panel h3 {
  margin-bottom: 0.4rem;
}

.explain-panel h4 {
  margin: 1.1rem 0 0.35rem;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  color: var(--ink-900);
}

.explain-panel p {
  color: var(--ink-700);
}

.explain-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

/* Tabs demo */

.demo-tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  border-bottom: 2px solid #e5ecf1;
}

.demo-tabs__tab {
  font: inherit;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  background: transparent;
  color: var(--ink-700);
  cursor: pointer;
}

.demo-tabs__tab:hover {
  color: var(--red-800);
}

.demo-tabs__tab[aria-selected="true"] {
  color: var(--red-800);
  border-bottom-color: var(--red-700);
}

.demo-tabs__panel {
  padding: 0.9rem 0.1rem 0.2rem;
}

.demo-tabs__panel h4 {
  margin: 0 0 0.3rem;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}

.demo-tabs__panel p {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.95rem;
}

/* Gauge demo */

.demo-gauge__dial {
  position: relative;
  height: 7.5rem;
  margin: 0.4rem auto 0;
  max-width: 15rem;
  overflow: hidden;
}

.demo-gauge__dial::before,
.demo-gauge__fill {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.demo-gauge__dial::before {
  background: var(--ink-100);
}

.demo-gauge__fill {
  background: conic-gradient(
    from 270deg,
    var(--red-700) 0turn,
    var(--red-700) calc(var(--demo-gauge-value, 0) * 0.005turn),
    transparent calc(var(--demo-gauge-value, 0) * 0.005turn)
  );
}

.demo-gauge__dial::after {
  content: "";
  position: absolute;
  inset: 22% 22% 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  background: var(--white);
}

.demo-gauge__reading {
  position: absolute;
  inset-inline: 0;
  bottom: 0.2rem;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-family: "Sora", sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink-900);
}

.demo-gauge__band {
  margin: 0.5rem 0 0;
  text-align: center;
  color: var(--ink-700);
  font-size: 0.95rem;
}

.demo-gauge__target {
  display: block;
  color: var(--ink-500);
  font-size: 0.88rem;
}

.demo-gauge__control,
.demo-reveal__control,
.demo-search__field {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.9rem;
  font-weight: 600;
  color: var(--ink-700);
  font-size: 0.92rem;
}

.demo-gauge__control input,
.demo-reveal__control input {
  width: 100%;
  accent-color: var(--red-700);
}

/* Before and after demo */

.demo-reveal__stage {
  position: relative;
  height: 10rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #dde5eb;
}

.demo-reveal__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 0.6rem;
}

.demo-reveal__panel--before {
  background: repeating-linear-gradient(45deg, #e7eef4, #e7eef4 12px, #dbe6ee 12px, #dbe6ee 24px);
}

.demo-reveal__panel--after {
  background: repeating-linear-gradient(45deg, #fde3e8, #fde3e8 12px, #fbd2da 12px, #fbd2da 24px);
  clip-path: inset(0 0 0 var(--demo-reveal-position, 50%));
}

.demo-reveal__tag {
  background: var(--white);
  border: 1px solid #dde5eb;
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-900);
}

.demo-reveal__panel--after .demo-reveal__tag {
  margin-inline-start: auto;
}

/* Section search demo */

.demo-search__field input {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cdd7df;
  border-radius: 10px;
  background: var(--white);
}

.demo-search__scope {
  margin: 0.6rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-500);
}

.demo-search__results {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.demo-search__results li {
  border: 1px solid #e5ecf1;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.7rem;
  background: var(--white);
}

.demo-search__title {
  display: block;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-900);
}

.demo-search__meta {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-500);
}

.demo-search__empty {
  margin: 0.6rem 0 0;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-md);
  background: var(--ink-100);
  color: var(--ink-700);
  font-size: 0.92rem;
}

/* Table of contents demo */

.demo-toc {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 1rem;
}

.demo-toc__nav {
  border-inline-start: 3px solid var(--red-100);
  padding-inline-start: 0.8rem;
}

.demo-toc__heading {
  margin: 0 0 0.4rem;
  font-family: "Sora", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.demo-toc__nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.demo-toc__nav a {
  display: block;
  min-height: 24px;
  padding: 0.2rem 0;
  color: var(--ink-700);
  font-size: 0.92rem;
  text-decoration: underline;
}

.demo-toc__nav a:hover {
  color: var(--red-800);
}

.demo-toc__level-3 {
  padding-inline-start: 0.9rem;
}

.demo-toc__doc {
  max-height: 12rem;
  overflow-y: auto;
  border: 1px solid #e5ecf1;
  border-radius: var(--radius-md);
  padding: 0.7rem 0.85rem;
  background: var(--white);
}

.demo-toc__doc-heading {
  margin: 0.8rem 0 0.2rem;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  scroll-margin-top: 0.5rem;
}

.demo-toc__doc-heading:first-child {
  margin-top: 0;
}

.demo-toc__doc p {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.92rem;
}

@media (max-width: 700px) {
  .demo-toc {
    grid-template-columns: 1fr;
  }
}

/* Media frames and placeholders ------------------------------------------- */

.media-frame {
  border: 1px solid #dde5eb;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.media-frame__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  background: var(--ink-100);
  border-bottom: 1px solid #dde5eb;
}

.media-frame__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c3d0da;
}

.media-frame__title {
  margin-left: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-500);
}

.media-frame__body {
  padding: 1.1rem;
}

.media-placeholder {
  display: grid;
  place-content: center;
  gap: 0.3rem;
  min-height: 190px;
  padding: 1.2rem;
  text-align: center;
  border: 2px dashed #c3d0da;
  border-radius: var(--radius-md);
  background: var(--ink-100);
  color: var(--ink-500);
  font-size: 0.94rem;
}

.media-placeholder strong {
  font-family: "Sora", sans-serif;
  color: var(--ink-700);
}

.media-placeholder + .media-placeholder {
  margin-top: 1rem;
}

/* Feature rows ------------------------------------------------------------ */

.feature-rows {
  display: grid;
  gap: 0;
  margin: 0;
}

.feature-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  gap: 0.4rem 1.6rem;
  padding: 0.95rem 0;
  border-top: 1px solid #e5ecf1;
}

.feature-rows > div:last-child {
  border-bottom: 1px solid #e5ecf1;
}

.feature-rows dt {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: var(--ink-900);
}

.feature-rows dd {
  margin: 0;
  color: var(--ink-700);
}

/* Numbered cards (use cases, steps) --------------------------------------- */

.numbered-card {
  position: relative;
  padding-top: 1.35rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.55rem;
  border-radius: 50%;
  background: var(--red-100);
  color: var(--red-800);
  font-family: "Sora", sans-serif;
  font-weight: 800;
}

.card-role {
  margin: 0 0 0.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Specification tables ---------------------------------------------------- */

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 0.8rem 0.2rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #e5ecf1;
}

.spec-table th {
  width: 34%;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  color: var(--ink-900);
}

.spec-table td {
  color: var(--ink-700);
}

.pending {
  display: inline-block;
  padding: 0.05rem 0.55rem;
  border-radius: 999px;
  background: var(--red-100);
  color: var(--red-800);
  font-size: 0.82rem;
  font-weight: 700;
}

/* Pricing plans ----------------------------------------------------------- */

.plan-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 4px solid #dde5eb;
}

.plan-card--featured {
  border-top-color: var(--red-700);
  box-shadow: var(--shadow-md);
}

.plan-badge {
  position: absolute;
  top: -0.85rem;
  right: 1rem;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--red-700);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
}

.plan-price {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink-900);
}

.plan-term {
  margin: 0;
  color: var(--ink-500);
  font-size: 0.92rem;
}

.plan-card .btn {
  margin-top: auto;
}

/* Comparison table -------------------------------------------------------- */

.table-scroll {
  position: relative; /* contains the absolutely positioned .visually-hidden cell labels */
  overflow-x: auto;
  border: 1px solid #dde5eb;
  border-radius: var(--radius-lg);
  background: var(--white);
}

.plan-grid + .table-scroll {
  margin-top: 1.6rem;
}

.table-scroll:focus-visible {
  outline: 3px solid var(--red-700);
  outline-offset: 2px;
}

.compare-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.compare-table caption {
  padding: 0.9rem 1rem 0;
  text-align: left;
  color: var(--ink-500);
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #e9eef2;
  text-align: center;
}

.compare-table thead th {
  background: var(--ink-100);
  font-family: "Sora", sans-serif;
  color: var(--ink-900);
}

.compare-table tbody th {
  text-align: left;
  font-weight: 600;
  color: var(--ink-900);
}

.compare-table td {
  color: var(--ink-700);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.mark-yes {
  color: var(--red-700);
  font-weight: 700;
}

.mark-no {
  color: var(--ink-500);
}

/* Documentation cards ----------------------------------------------------- */

.doc-card h3 {
  margin-bottom: 0.35rem;
}

.doc-card p {
  margin: 0 0 0.7rem;
  color: var(--ink-700);
}

.doc-status {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-500);
}

@media (max-width: 980px) {
  .product-hero--split .hero-grid {
    grid-template-columns: 1fr;
  }

  .plan-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .feature-rows > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .spec-table,
  .spec-table tbody,
  .spec-table tr,
  .spec-table th,
  .spec-table td {
    display: block;
    width: auto;
  }

  .spec-table tr {
    padding: 0.6rem 0;
    border-bottom: 1px solid #e5ecf1;
  }

  .spec-table th,
  .spec-table td {
    padding: 0;
    border-bottom: 0;
  }

  .spec-table th {
    margin-bottom: 0.15rem;
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }
}
