/* Mobile app service page.
   Page shell, sub-nav, structure tabs, diagram frame and pricing come from
   service-page.css (.sv- prefix). Only what this page alone uses lives here. */

/* ---------- Honest opener ---------- */

/* The first thing on the page talks people out of an app if they do not need
   one, so it is styled as a note rather than a sales banner. */
.ap-first {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding: 32px 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-2);
}
.ap-first > div { flex: 1 1 440px; }
.ap-first h2 {
  margin: 0 0 10px;
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  text-transform: uppercase;
}
.ap-first p { margin: 0 0 12px; color: var(--text-muted); font-size: 0.94rem; line-height: 1.75; }
.ap-first p:last-child { margin-bottom: 0; }
.ap-first strong { color: var(--text); }
.ap-first-links { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- The numbers behind not building an app ---------- */

.ap-stats { display: flex; flex-wrap: wrap; gap: 20px; margin: 40px 0 12px; }
.ap-stat {
  flex: 1 1 300px;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent-2);
}
.ap-stat-fig {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
}
.ap-stat-l { margin: 0 0 14px; color: var(--text); font-size: 0.95rem; line-height: 1.55; }
.ap-stat-n {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* Sources sit under the figures rather than in a footnote nobody reads. */
.ap-source {
  margin: 0 0 40px;
  color: #6A6A6A;
  font-size: 0.78rem;
  line-height: 1.7;
}

/* ---------- Frequency plot ---------- */

.if-band { fill: #131313; stroke: #2C2C2C; stroke-width: 1; }
.if-band-mid { fill: rgba(255, 255, 255, 0.02); stroke: #3A3A3A; }
.if-band-on { fill: rgba(238, 62, 201, 0.07); stroke: var(--accent-1); }
.if-band-t { fill: var(--text); font-family: var(--font-nav); font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.if-band-t-on { fill: var(--accent-1); }
.if-band-s { fill: var(--text-muted); font-family: var(--font-body); font-size: 12.5px; }

.if-axis { stroke: #3A3A3A; stroke-width: 1.4; }
.if-axis-t { fill: #6A6A6A; font-family: var(--font-nav); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.if-lead { stroke: #333333; stroke-width: 1; stroke-dasharray: 3 3; }
.if-dot { fill: var(--accent-1); }
.if-pin { fill: var(--text); font-family: var(--font-body); font-size: 12.5px; }

.if-trap { fill: none; stroke: var(--accent-2); stroke-width: 1.2; }
.if-trap-t { fill: var(--accent-2); font-family: var(--font-nav); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.if-trap-s { fill: #6A6A6A; font-family: var(--font-body); font-size: 12px; }

/* ---------- Wide diagrams ---------- */

.ap-wide-wrap,
.ap-matrix-wrap {
  margin: 0 0 12px;
  padding: 24px;
  overflow-x: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 22px 22px;
}
.ap-wide { display: block; width: 100%; min-width: 860px; height: auto; }
.ap-matrix { display: block; width: 100%; min-width: 780px; height: auto; }

.ap-scroll-hint {
  margin: 0 0 40px;
  color: #6A6A6A;
  font-family: var(--font-nav);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- Cards ---------- */

.ap-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.ap-cards > .ap-card { flex: 1 1 330px; max-width: 400px; }

.ap-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: border-color 0.25s ease;
}
.ap-card:hover { border-color: var(--accent-1); }
.ap-card > i { color: var(--accent-1); font-size: 1.3rem; }
.ap-card h3 {
  margin: 16px 0 12px;
  font-family: var(--font-nav);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.ap-card-what { margin: 0 0 14px; color: var(--text); font-size: 0.9rem; line-height: 1.65; }
.ap-card-why {
  margin: 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.75;
}
/* The upkeep section is the uncomfortable one, so it is marked as such. */
.ap-cards-warn > .ap-card { border-left: 2px solid var(--accent-2); }
.ap-cards-warn > .ap-card > i { color: var(--accent-2); }
.ap-cards-warn > .ap-card:hover { border-color: var(--accent-2); }

/* ---------- Diagram beside its explanation ---------- */

.ap-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: center; margin-bottom: 48px; }
.ap-pair:last-of-type { margin-bottom: 0; }
.ap-pair-text h3 { margin: 0 0 14px; font-size: 1.45rem; }
.ap-pair-text p { margin: 0 0 14px; color: var(--text-muted); font-size: 0.93rem; line-height: 1.8; }
.ap-pair-text p:last-child { margin-bottom: 0; }
.ap-pair-text strong { color: var(--text); }
.ap-pair .sv-diagram-wrap { margin: 0; }

.ap-sub { margin: 64px 0 12px; font-size: 1.45rem; }
.ap-sub-first { margin-top: 0; }
.ap-sub-p { max-width: 720px; margin: 0 0 24px; color: var(--text-muted); font-size: 0.93rem; line-height: 1.8; }
.ap-sub-p strong { color: var(--text); }

.ap-note {
  margin: 0;
  padding: 18px 20px;
  background: var(--bg);
  border-left: 2px solid var(--accent-2);
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}
.ap-note i { margin-right: 8px; color: var(--accent-2); }
.ap-note strong { color: var(--text); }

/* ---------- Capability matrix ---------- */

.mx-col { fill: #131313; stroke: #2C2C2C; stroke-width: 1; }
.mx-col-on { fill: rgba(238, 62, 201, 0.05); stroke: var(--accent-1); }
.mx-head {
  fill: var(--text-muted);
  font-family: var(--font-nav);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mx-head-on { fill: var(--accent-1); }
.mx-row { fill: var(--text); font-family: var(--font-body); font-size: 14px; }
.mx-rule { stroke: #232323; stroke-width: 1; }

.mx-yes { fill: rgba(238, 62, 201, 0.3); stroke: var(--accent-1); stroke-width: 1.2; }
.mx-tick { fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mx-part { fill: none; stroke: var(--accent-2); stroke-width: 1.2; stroke-dasharray: 3 3; }
.mx-part-dot { fill: var(--accent-2); }
.mx-no { stroke: #4A4A4A; stroke-width: 2; stroke-linecap: round; }

/* ---------- Build routes ---------- */

.ap-url { fill: #3A3A3A; }
.ap-phone { fill: #1C1C1C; stroke: #3A3A3A; stroke-width: 1.4; }
.ap-screen { fill: #0C0C0C; stroke: #262626; stroke-width: 1; }
.ap-icon { fill: #262626; }
.ap-icon-on { fill: rgba(238, 62, 201, 0.5); stroke: var(--accent-1); stroke-width: 1; }
.ap-arrow { fill: none; stroke: #3A3A3A; stroke-width: 1.3; }
.ap-arrow-on { stroke: var(--accent-1); stroke-width: 1.5; }

.ap-code { fill: #141414; stroke: #3A3A3A; stroke-width: 1.2; }
.ap-code-on { fill: rgba(238, 62, 201, 0.08); stroke: var(--accent-1); }
.ap-code-ln { fill: #2E2E2E; }
.ap-code-t { fill: var(--text); font-family: var(--font-nav); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.ap-code-s { fill: var(--text-muted); font-family: var(--font-body); font-size: 11px; }

/* ---------- Thumb zones ---------- */

.tz-hard { fill: rgba(255, 111, 60, 0.07); stroke: rgba(255, 111, 60, 0.35); stroke-width: 1; }
.tz-stretch { fill: #161616; stroke: #2C2C2C; stroke-width: 1; }
.tz-easy { fill: rgba(238, 62, 201, 0.13); stroke: var(--accent-1); stroke-width: 1.1; }
.tz-arc { fill: none; stroke: var(--accent-1); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: 0.85; }
.tz-pivot { fill: var(--accent-1); }
.tz-l { fill: var(--text); font-family: var(--font-nav); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.tz-l-hard { fill: var(--accent-2); }
.tz-l-easy { fill: var(--accent-1); }
.tz-s { fill: #6A6A6A; font-family: var(--font-body); font-size: 11px; }

/* ---------- Offline sync ---------- */

.os2-band { fill: #141414; stroke: #2E2E2E; stroke-width: 1; }
.os2-band-off { fill: rgba(255, 111, 60, 0.08); stroke: rgba(255, 111, 60, 0.45); stroke-dasharray: 4 4; }
.os2-t { fill: var(--text); font-family: var(--font-nav); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.os2-warn { fill: var(--accent-2); }
.os2-rail { stroke: #2E2E2E; stroke-width: 1.5; }
.os2-act { fill: #191919; stroke: #2E2E2E; stroke-width: 1; }
.os2-act-q { stroke: rgba(255, 111, 60, 0.5); }
.os2-act-on { fill: rgba(238, 62, 201, 0.12); stroke: var(--accent-1); }
.os2-s { fill: var(--text-muted); font-family: var(--font-nav); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.os2-sync { fill: none; stroke: var(--accent-1); stroke-width: 1.2; opacity: 0.8; }

/* ---------- Backend faces ---------- */

.bf-face { fill: #141414; stroke: #2E2E2E; stroke-width: 1.1; }
.bf-face-on { stroke: var(--accent-1); }
.bf-t { fill: var(--text); font-family: var(--font-nav); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.bf-core { fill: rgba(238, 62, 201, 0.07); stroke: var(--accent-1); stroke-width: 1.4; }
.bf-core-t { fill: var(--text); font-family: var(--font-nav); font-size: 20px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.bf-s { fill: var(--text-muted); font-family: var(--font-body); font-size: 12.5px; }

/* ---------- Review gate ---------- */

.rg-box { fill: #141414; stroke: #3A3A3A; stroke-width: 1.2; }
.rg-box-on { fill: rgba(238, 62, 201, 0.07); stroke: var(--accent-1); }
.rg-t { fill: var(--text); font-family: var(--font-nav); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; }
.rg-on { fill: var(--accent-1); }
.rg-s { fill: var(--text-muted); font-family: var(--font-body); font-size: 11px; }
.rg-gate { fill: #101010; stroke: var(--accent-2); stroke-width: 1.4; }
.rg-gate-t { fill: var(--text); font-family: var(--font-nav); font-size: 16px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.rg-fail { fill: none; stroke: var(--accent-2); stroke-width: 1.3; stroke-dasharray: 4 4; }
.rg-fail-t { fill: var(--accent-2); font-family: var(--font-nav); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.rg-tag { fill: #101010; stroke: rgba(255, 111, 60, 0.4); stroke-width: 1; }
.rg-tag-t { fill: var(--text-muted); font-family: var(--font-body); font-size: 12px; }

/* ---------- Commission lanes ---------- */

.cl-lane { fill: #111111; stroke: #2C2C2C; stroke-width: 1; }
.cl-lane-warn { stroke: rgba(255, 111, 60, 0.4); }
.cl-lane-ok { stroke: rgba(238, 62, 201, 0.4); }
.cl-tag { font-family: var(--font-nav); font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.cl-warn { fill: var(--accent-2); }
.cl-ok { fill: var(--accent-1); }
.cl-s { fill: #6A6A6A; font-family: var(--font-body); font-size: 11.5px; }
.cl-box { fill: #191919; stroke: #2E2E2E; stroke-width: 1; }
.cl-box-on { stroke: var(--accent-1); }
.cl-box-t { fill: var(--text); font-family: var(--font-nav); font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; }
.cl-cut { fill: var(--accent-2); font-family: var(--font-display); font-size: 26px; }

/* ---------- Release timeline ---------- */

.rt-seg { fill: #141414; stroke: #2E2E2E; stroke-width: 1.1; }
.rt-seg-wait { fill: rgba(255, 111, 60, 0.08); stroke: rgba(255, 111, 60, 0.45); }
.rt-seg-live { fill: rgba(238, 62, 201, 0.14); stroke: var(--accent-1); }
.rt-tail { fill: url(#rtfade); stroke: rgba(238, 62, 201, 0.3); stroke-width: 1; }
.rt-old { fill: #111111; stroke: rgba(255, 111, 60, 0.45); stroke-width: 1; stroke-dasharray: 5 4; }
.rt-t { fill: var(--text); font-family: var(--font-nav); font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.rt-s { fill: var(--text-muted); font-family: var(--font-body); font-size: 12px; }
.rt-warn { fill: var(--accent-2); }
.rt-on { fill: var(--accent-1); }
.rt-drop { stroke: rgba(255, 111, 60, 0.45); stroke-width: 1; stroke-dasharray: 3 3; }

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .ap-pair { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 768px) {
  .ap-first { padding: 26px; }
}
