/* ===== BPro Basic vs. Pro comparison chart (collapsible) ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.cmp-wrap {
  overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-1);
}
.cmp-table { border-collapse: collapse; width: 100%; min-width: 560px; }
.cmp-table th, .cmp-table td {
  text-align: left; padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line-soft); font-size: 0.95rem;
}
.cmp-table thead th { background: var(--accent); color: #FFFFFF; font-weight: 700; vertical-align: middle; }
.cmp-table thead th.cmp-col { text-align: center; width: 6.25rem; }
.cmp-col-name { display: block; font-size: 0.95rem; }
.cmp-col-sub { display: block; font-size: 0.72rem; font-weight: 600; opacity: 0.92; letter-spacing: 0.03em; }
.cmp-table .cmp-feat { color: var(--ink-2); font-weight: 600; }
.cmp-table .cmp-feat small { display: block; font-weight: 400; color: var(--muted); font-size: 0.82rem; margin-top: 0.15rem; }
.cmp-table td.cmp-c { text-align: center; font-weight: 700; }
.cmp-yes { color: #0F7A3D; }               /* included */
.cmp-no  { color: var(--muted); }          /* not included */
.cmp-note { color: var(--accent-deep); font-weight: 800; font-size: 0.85rem; }
.cmp-table tbody tr:last-child td { border-bottom: none; }

/* collapsible group header rows */
.cmp-grp td { padding: 0; background: var(--bg-edge); }
.cmp-grp-btn {
  width: 100%; display: flex; align-items: center; gap: 0.6rem;
  background: none; border: 0; cursor: pointer; padding: 0.7rem 1.1rem; text-align: left;
  font-family: var(--sans); font-weight: 800; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink);
}
.cmp-grp-btn:hover { background: var(--accent-soft); }
.cmp-arrow { color: var(--accent); font-size: 0.8rem; transition: transform 160ms ease; }
.cmp-grp-btn[aria-expanded="false"] .cmp-arrow { transform: rotate(-90deg); }
.cmp-row[hidden] { display: none; }

/* one-time price banner under the chart */
.cmp-banner {
  margin-top: 1.5rem; display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap;
  background: rgba(245,166,35,0.12); border: 1px solid rgba(245,166,35,0.5);
  border-radius: var(--radius-lg); padding: 1.25rem 1.5rem;
}
.cmp-banner .cmp-price { font-size: 2rem; font-weight: 900; color: var(--ink); white-space: nowrap; line-height: 1; }
.cmp-banner .cmp-price small { display: block; font-size: 0.72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.25rem; }
.cmp-banner p { flex: 1; min-width: 240px; margin: 0; color: var(--body); font-size: 0.97rem; }
/* Platinum tier — plum variant of the pricing banner */
.cmp-banner-platinum { margin-top: 1rem; background: rgba(109,40,217,0.12); border-color: rgba(109,40,217,0.5); }
.cmp-banner-platinum .cmp-price { color: var(--accent-2); }

/* =========================================================
   Apps section — sbadigitalsolutions.com/apps/
   Rides on the site's styles.css chrome (topbar, footer,
   buttons, sections). Adds: BPro brand accents, app-card
   grid, app detail layout, and the feedback form.
   Self-contained so the apps section stays independent.
   ========================================================= */

/* ---------- BPro brand tokens ---------- */
.apps-page {
  --bpro:        #3D34A8;   /* indigo */
  --bpro-deep:   #2A2385;
  --bpro-soft:   rgba(61, 52, 168, 0.10);
  --bpro-orange: #F5A623;   /* folder tab / unread dot */
  --bpro-orange-deep: #E0930F;
}

/* ---------- Reusable BPro mark (inline SVG) ---------- */
.bpro-mark { display: block; width: 100%; height: auto; }

/* ---------- Skip link (a11y) — matches Phase G portal pattern ---------- */
.skip-link {
  position: absolute; left: 0.75rem; top: -3rem; z-index: 200;
  background: var(--accent); color: #FFFFFF; font-weight: 600;
  padding: 0.6rem 1rem; border-radius: var(--radius);
  transition: top 160ms ease;
}
.skip-link:focus { top: 0.75rem; color: #FFFFFF; outline: none; }

/* ---------- Ghost button for light surfaces (outline) ---------- */
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ============================================================
   HERO (shared shell for hub + detail, dark cinematic)
   ============================================================ */
.apps-hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: #FFFFFF;
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad-x) clamp(3rem, 6vw, 4.5rem);
}
.apps-hero .hero-bg { position: absolute; inset: 0; z-index: 0; }
.apps-hero .hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none;
}
.apps-hero .hero-glow-1 {
  width: 480px; height: 480px; top: -180px; right: -80px;
  background: var(--accent-glow); opacity: 0.30;
}
.apps-hero .hero-glow-2 {
  width: 340px; height: 340px; bottom: -140px; left: -60px;
  background: var(--accent-2-soft); opacity: 0.55;
}
.apps-hero-inner {
  position: relative; z-index: 1;
  max-width: var(--container); margin: 0 auto;
}
.apps-hero .hero-eyebrow { margin-bottom: 1rem; }
.apps-hero .hero-eyebrow .script { color: #FFFFFF; opacity: 0.85; font-size: 1.25rem; }
.apps-h1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  color: #FFFFFF; line-height: 1.0; margin: 0 0 0.5rem;
}
.apps-h1 .accent { color: var(--accent-2); }
.apps-h1-sub {
  max-width: 60ch; font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255,255,255,0.78); margin: 0.75rem 0 0;
}
.apps-h1-sub em { color: #FFFFFF; font-style: normal; font-weight: 600; }
/* Handwritten purple accent in the hero sub — larger + glowing so it
   pops against the black hero (Sandi's request). Lightens whatever the
   theme's accent-2 is, then adds a soft same-hue glow. */
.apps-h1-sub .script-inline {
  color: color-mix(in srgb, var(--accent-2) 60%, #FFFFFF);
  font-size: 1.6em;
  font-weight: 700;
  /* line-height:1 keeps the bigger script from inflating the lines it
     sits on, so the paragraph stays evenly spaced */
  line-height: 1;
  text-shadow:
    0 0 18px color-mix(in srgb, var(--accent-2) 65%, transparent),
    0 0 4px  color-mix(in srgb, var(--accent-2) 50%, transparent);
}

/* App icon images fill their rounded frames */
.app-card-icon img,
.bpro-badge img,
.app-card-icon svg,
.bpro-badge svg { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================================
   APP CARD GRID (hub)
   ============================================================ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.app-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-1);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2);
  border-color: var(--accent);
}
.app-card-head {
  display: flex; align-items: center; gap: 1rem; margin-bottom: 1.15rem;
}
.app-card-icon {
  flex: 0 0 auto; width: 64px; height: 64px;
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(61,52,168,0.28);
}
.app-card-titles { min-width: 0; }
.app-card-name {
  font-size: 1.25rem; font-weight: 900; color: var(--ink);
  letter-spacing: -0.02em; margin: 0;
}
.app-card-cat {
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.app-card-desc { color: var(--body); font-size: 0.97rem; margin: 0 0 1.25rem; flex: 1; }
.app-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.35rem; }
.app-tag {
  font-size: 0.75rem; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border-radius: 100px;
  padding: 0.25rem 0.7rem;
}
.app-card-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: auto; }

/* Status ribbon */
.app-status {
  position: absolute; top: 1.1rem; right: 1.1rem;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 0.28rem 0.6rem; border-radius: 100px;
}
.app-status-beta  { color: var(--bpro-orange-deep); background: rgba(245,166,35,0.15); }
.app-status-live  { color: #0F7A3D; background: rgba(15,122,61,0.13); }
.app-status-soon  { color: var(--muted); background: rgba(107,114,128,0.13); }

/* "More coming" placeholder card */
.app-card-soon {
  align-items: center; justify-content: center; text-align: center;
  border-style: dashed; background: transparent; box-shadow: none;
  color: var(--muted); min-height: 220px;
}
.app-card-soon:hover { transform: none; box-shadow: none; border-color: var(--line); }
.app-card-soon .soon-glyph { font-size: 2rem; opacity: 0.5; margin-bottom: 0.5rem; }
.app-card-soon h3 { color: var(--ink-2); font-size: 1.1rem; margin: 0 0 0.35rem; }
.app-card-soon p { font-size: 0.9rem; margin: 0 0 1.1rem; max-width: 26ch; }

/* ============================================================
   APP DETAIL PAGE (BPro)
   ============================================================ */
.app-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.app-detail-hero .adh-text { min-width: 0; }
.app-detail-brandline {
  display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.25rem;
}
.app-detail-brandline .bpro-badge {
  flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 18px rgba(61,52,168,0.4);
}
.app-detail-brandline .adb-name { font-size: 1.05rem; font-weight: 800; color: #FFFFFF; }
.app-detail-brandline .adb-cat {
  font-size: 0.78rem; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600;
}
/* Portrait demo video, presented like a phone in the hero */
.app-hero-video {
  margin: 0; width: 100%; max-width: 340px; justify-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
}
.app-hero-video video {
  width: 100%; height: auto; display: block; background: #000;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.app-hero-video-cap {
  font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}

.app-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 1.75rem; }
.app-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  border-radius: 100px; padding: 0.4rem 0.85rem;
}
.app-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bpro-orange); }
/* Patent-pending — emphasized on dark hero */
.app-badge.is-patent {
  background: rgba(245,166,35,0.16);
  border-color: rgba(245,166,35,0.55);
  color: #FCE3BC; font-weight: 700;
  letter-spacing: 0.02em;
}

/* Patent-pending tag tied to the Tabs feature (dark section) */
.patent-tag {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--bpro-orange);
}
.patent-tag .pt-glyph { font-size: 0.95rem; line-height: 1; }

/* Patent-pending tag on the light hub card */
.app-tag.is-patent {
  color: var(--bpro-orange-deep);
  background: rgba(245,166,35,0.16);
  font-weight: 700;
}

/* Feature grid on detail page */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.35rem;
}
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow-1);
}
.feature-icon { font-size: 1.6rem; margin-bottom: 0.65rem; line-height: 1; }
.feature h3 { font-size: 1.1rem; color: var(--ink); margin: 0 0 0.5rem; letter-spacing: -0.01em; }
.feature p { font-size: 0.94rem; color: var(--body); margin: 0; }
.feature ul { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.92rem; color: var(--body); line-height: 1.6; }
.feature ul li { margin-bottom: 0.2rem; }

/* Screenshot gallery — horizontal scroll-snap strip */
.screens {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.25rem 1.5rem;
  margin: 0 -0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.screens::-webkit-scrollbar { height: 8px; }
.screens::-webkit-scrollbar-thumb { background: var(--line); border-radius: 100px; }
.screens::-webkit-scrollbar-track { background: transparent; }
.screen {
  flex: 0 0 auto;
  width: clamp(208px, 58vw, 244px);
  scroll-snap-align: center;
}
.screen-img {
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  line-height: 0;
}
.screen-img img { width: 100%; height: auto; display: block; }
.screen-cap {
  margin: 0.95rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--body);
  line-height: 1.35;
}
.screens-hint {
  text-align: center; color: var(--muted); font-size: 0.85rem; margin: 0.25rem 0 0;
}

/* Tabs demo strip (the signature feature) */
.tabs-demo {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0;
}
.tab-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 600;
  padding: 0.45rem 0.95rem; border-radius: 100px;
  background: rgba(255,255,255,0.10); color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.2);
}
.tab-chip .unread {
  width: 9px; height: 9px; border-radius: 50%; background: var(--bpro-orange);
}
.tab-chip.is-active { background: #FFFFFF; color: var(--bpro); border-color: #FFFFFF; }

/* Pricing / honesty band */
.price-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem; align-items: stretch;
}
.price-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
}
.price-card.is-pro { border-color: var(--bpro); box-shadow: var(--shadow-2); position: relative; }
.price-card.is-pro::before {
  content: "One-time"; position: absolute; top: -12px; left: 2rem;
  background: var(--bpro); color: #FFFFFF; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 0.25rem 0.7rem; border-radius: 100px;
}
.price-tier { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.price-amt { font-size: 2.4rem; font-weight: 900; color: var(--ink); letter-spacing: -0.03em; margin: 0.35rem 0 0.15rem; }
.price-amt .per { font-size: 0.9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-card ul { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.price-card ul li {
  position: relative; padding-left: 1.5rem; margin-bottom: 0.55rem;
  font-size: 0.94rem; color: var(--body);
}
.price-card ul li::before {
  content: "\2713"; position: absolute; left: 0; color: var(--bpro); font-weight: 900;
}

/* ============================================================
   FEEDBACK FORM
   ============================================================ */
.apps-form-wrap { max-width: 760px; margin: 0 auto; }
.form {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.fieldset { border: 0; margin: 0 0 1.75rem; padding: 0; }
.fieldset:last-of-type { margin-bottom: 0; }
.fieldset > legend {
  font-size: 0.82rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--accent); padding: 0; margin-bottom: 1rem;
}
.field { margin-bottom: 1.15rem; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block; font-size: 0.9rem; font-weight: 600;
  color: var(--ink-2); margin-bottom: 0.4rem;
}
.field label .req { color: var(--accent-2); margin-left: 0.15em; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.85em; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--surface-2); border: 1px solid var(--field-border);
  border-radius: var(--radius); padding: 0.7rem 0.85rem;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Request-type segmented radio cards */
.type-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.type-choice { position: relative; cursor: pointer; }
.type-choice input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.type-choice .tc-card {
  display: block; text-align: center; padding: 1rem 0.75rem;
  background: var(--surface-2); border: 1.5px solid var(--field-border);
  border-radius: var(--radius-lg); transition: 160ms ease;
}
.type-choice .tc-emoji { font-size: 1.5rem; display: block; margin-bottom: 0.35rem; }
.type-choice .tc-label { font-size: 0.92rem; font-weight: 700; color: var(--ink-2); }
.type-choice:hover .tc-card { border-color: var(--accent); }
.type-choice input:checked + .tc-card {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.type-choice input:focus-visible + .tc-card { outline: 2px solid var(--accent); outline-offset: 2px; }

.form-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem;
  margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft);
}
.actions-note { font-size: 0.85rem; color: var(--muted); margin: 0; flex: 1; min-width: 220px; }

/* Bug-only fields revealed by JS */
.bug-only[hidden] { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .app-detail-hero { grid-template-columns: 1fr; }
  .app-hero-video { order: 2; margin-top: 0.5rem; max-width: 300px; }
}
@media (max-width: 620px) {
  .grid-2 { grid-template-columns: 1fr; }
  .type-choices { grid-template-columns: 1fr; }
  .type-choice .tc-card { display: flex; align-items: center; gap: 0.6rem; text-align: left; }
  .type-choice .tc-emoji { margin-bottom: 0; }
  .form-actions .btn { width: 100%; justify-content: center; }
}
