/* Apps index, product page, and FAQ. Loaded only by those pages.
   Everything shared (page shell, header, hero, .content-section) lives in site.css. */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto 1rem;
  font-size: 0.8125rem;
  color: var(--sr-legal-muted);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.breadcrumb a {
  color: var(--sr-link);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb a:focus-visible {
  border-radius: 2px;
}

.breadcrumb .sep {
  user-select: none;
  color: var(--sr-sep);
}

.breadcrumb [aria-current="page"] {
  color: var(--sr-text);
  font-weight: 600;
}

/* ---------- Call to action ---------- */
.cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Scoped to .cta-row, not bare .cta-button. The call to action appears both in
   the hero and inside a .content-section, and `.content-section a` (0,1,1) beats
   a bare class (0,1,0), so the second instance rendered as blue underlined link
   text on a blue button. Keeping these at 0,2,0 makes the component render
   identically wherever it is placed. */
.cta-row .cta-button {
  display: inline-flex;
  align-items: center;
  /* Pinned, not inherited. `.content-section a` sets overflow-wrap: anywhere,
     which breaks the label character by character in a narrow container, and the
     hero centres text while a .content-section does not. */
  text-align: center;
  overflow-wrap: normal;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sr-blue-deep) 0%, var(--sr-blue) 100%);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 71, 161, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.cta-row .cta-button:hover {
  filter: brightness(1.07);
  box-shadow: 0 6px 20px rgba(13, 71, 161, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.cta-row .cta-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(13, 71, 161, 0.22);
}

.cta-row .cta-button:focus-visible {
  outline: 2px solid var(--sr-blue-deep);
  outline-offset: 3px;
}

/* Requirements line under the button, scoped to the row for the same reason. */
.cta-row .cta-meta {
  margin: 0;
  /* Pinned rather than inherited: the hero centres its text and sets a 28rem
     measure on paragraphs, a .content-section does neither, so an inherited
     value made the two instances wrap and align differently. */
  max-width: 28rem;
  padding: 0;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--sr-legal-muted);
}

.cta-row .cta-meta .sep {
  user-select: none;
  color: var(--sr-sep);
  padding: 0 0.3rem;
}

/* ---------- Screenshots ---------- */
.shot-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

.shot-pair img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--sr-border);
  background: var(--sr-surface);
}

.shot-caption {
  grid-column: 1 / -1;
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  color: var(--sr-legal-muted);
  text-align: center;
}

/* ---------- Specification table ---------- */
.spec-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.75rem;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  color: var(--sr-legal-body);
}

.spec-table th,
.spec-table td {
  border-bottom: 1px solid var(--sr-border);
  padding: 0.55rem 0.65rem 0.55rem 0;
  vertical-align: top;
  text-align: left;
}

.spec-table th {
  width: 34%;
  min-width: 9rem;
  font-weight: 600;
  color: var(--sr-gray-900);
}

.spec-table tr:last-child th,
.spec-table tr:last-child td {
  border-bottom: none;
}

/* ---------- Copy this link (phone readers) ---------- */
/* ---------- Apps index cards ---------- */
.app-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.app-card-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.9rem;
  flex-shrink: 0;
}

.app-card-head h2 {
  margin-bottom: 0.1rem;
}

.app-card-kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sr-teal);
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--sr-border);
}

.faq-item:last-of-type {
  border-bottom: none;
}

.faq-question {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.9rem 0;
  cursor: pointer;
  list-style: none;
  min-height: 2.75rem;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question::marker { content: ""; }

.faq-question h2 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  color: var(--sr-gray-900);
  margin: 0;
}

.faq-question:hover h2 { color: var(--sr-blue-deep); }

.faq-question:focus-visible {
  outline: 2px solid var(--sr-blue);
  outline-offset: -2px;
  border-radius: 6px;
}

/* Chevron drawn from borders so no icon font or SVG request is needed. */
.faq-question::after {
  content: "";
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  margin: 0.35rem 0 0 auto;
  border-right: 2px solid var(--sr-sep);
  border-bottom: 2px solid var(--sr-sep);
  border-radius: 1px;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.faq-item[open] .faq-question::after {
  transform: translateY(0.18em) rotate(-135deg);
}

.faq-answer {
  padding: 0 1.4rem 1rem 0;
}

.faq-answer p {
  color: var(--sr-legal-body);
  margin-bottom: 0.6rem;
}

.faq-answer p:last-child { margin-bottom: 0; }

.faq-answer a {
  color: var(--sr-link);
  overflow-wrap: anywhere;
}

.faq-answer a:focus-visible {
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .cta-row .cta-button { transition: none; }
  .cta-row .cta-button:active { transform: none; }
  .faq-question::after { transition: none; }
}

@media (max-width: 640px) {
  .breadcrumb {
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
  }
  .shot-pair {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .cta-row .cta-button {
    width: 100%;
    max-width: 22rem;
  }
  .spec-table th {
    width: 40%;
    min-width: 7.5rem;
  }
  .faq-question h2 { font-size: 1rem; }
}

/* ---------- Full size screenshot viewer ----------
   .shot-link is a plain anchor to the full resolution image, so it works with no
   JavaScript. sentrate-lightbox.js upgrades it to the <dialog> below. */
.shot-link {
  display: block;
  border-radius: 10px;
  cursor: zoom-in;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

/* Scoped to .shot-pair so it beats `.content-section a:focus-visible` (0,2,1),
   which otherwise won and drew the ring at a 2px radius around a thumbnail with
   10px corners. Same container-dependence trap as the call to action. */
.shot-pair .shot-link:focus-visible {
  outline: 2px solid var(--sr-blue);
  outline-offset: 3px;
  border-radius: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .shot-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(13, 71, 161, 0.14);
  }
  .shot-link:hover img {
    border-color: var(--sr-hero-border-hover);
  }
}

.shot-viewer {
  /* The global `* { margin: 0 }` reset in site.css wipes the UA stylesheet's
     `margin: auto` on <dialog>, which is what centres a modal one. Restore it. */
  margin: auto;
  width: min(96vw, 84rem);
  max-width: 96vw;
  max-height: 94vh;
  padding: 0.75rem;
  border: none;
  border-radius: 14px;
  background: var(--sr-surface);
  color: var(--sr-text);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  overflow: hidden;
}

.shot-viewer::backdrop {
  background: rgba(17, 24, 39, 0.74);
}

.shot-viewer-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--sr-bg-page);
}

.shot-viewer-caption {
  margin: 0.6rem 0.25rem 0.15rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--sr-legal-muted);
  text-align: center;
}

.shot-viewer-close {
  position: absolute;
  top: 1.35rem;
  right: 1.35rem;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--sr-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--sr-text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.shot-viewer-close:hover {
  background: #fff;
  border-color: var(--sr-sep);
}

.shot-viewer-close:focus-visible {
  outline: 2px solid var(--sr-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .shot-link { transition: none; }
  .shot-link:hover { transform: none; }
}

@media (max-width: 640px) {
  .shot-viewer {
    padding: 0.5rem;
    width: 98vw;
  }
  .shot-viewer-close {
    top: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }
}
