/* Synergy Digital Apps pages (apps/*.html). Built by tools/apps/build.mjs. */

/* Price tiles: 1px neutral border, no accent edges (DESIGN.md section 13) */
.ap-prices {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.ap-price {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}
.ap-price b {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.ap-price span {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text);
}
.ap-price small {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
}

/* Photo cards (hub "What we build"): wireframe image on black, no numbers */
.ap-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.ap-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.ap-card:hover {
  transform: translateY(-4px);
  border-color: var(--green-d);
  box-shadow: var(--shadow-lg);
}
.ap-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  background: var(--ink);
}
.ap-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 22px 24px;
}
.ap-card-body h3 {
  font-size: 1.15rem;
}
.ap-card-body h3 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--green-d);
  text-underline-offset: 4px;
}
.ap-card-body p {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
}
.ap-card-body p a {
  color: var(--green-d);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ap-card--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
  background: var(--ink);
  border-color: var(--ink);
}
.ap-card--wide img {
  width: 46%;
  flex: 0 0 46%;
}
.ap-card--wide .ap-card-body {
  justify-content: center;
  padding: 32px clamp(22px, 4vw, 48px);
}
.ap-card--wide .ap-card-body h3 {
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  color: var(--white);
}
.ap-card--wide .ap-card-body p {
  font-size: 1.02rem;
  color: var(--white);
}
.ap-card--wide .ap-card-body p a {
  color: var(--green);
}
@media (max-width: 960px) {
  .ap-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .ap-cards {
    grid-template-columns: 1fr;
  }
  .ap-card--wide {
    flex-direction: column;
  }
  .ap-card--wide img {
    width: 100%;
    flex: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ap-card:hover {
    transform: none;
  }
}

/* Box with an image on top (fix it / leave it) */
.ap-box.ap-box--img {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 0 24px;
  overflow: hidden;
}
.ap-box--img img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  background: var(--ink);
}
.ap-box--img h3,
.ap-box--img p,
.ap-box--img ul {
  margin: 0 24px;
}
.ap-box--img p {
  font-weight: 600;
}

/* Real app screenshots in phone frames */
.ap-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.ap-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
}
.ap-shots figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ap-shots img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 2px solid rgba(254, 200, 61, 0.55);
  border-radius: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(1, 255, 65, 0.12);
  background: #000;
}
.ap-shots figcaption {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.45;
}
.ap-shots figcaption b {
  display: block;
  font-weight: 800;
  color: #fec83d;
}
@media (max-width: 860px) {
  .ap-proof {
    grid-template-columns: 1fr;
  }
}

/* Image beside a list (brokerage example) */
.ap-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
  margin-top: 8px;
}
.ap-split img {
  width: 100%;
  height: auto;
  border-radius: var(--r-card);
  border: 1px solid rgba(1, 255, 65, 0.22);
  background: var(--ink);
}
.ap-steps-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.ap-steps-list li::marker {
  color: var(--green-d);
}
@media (max-width: 860px) {
  .ap-split {
    grid-template-columns: 1fr;
  }
}

/* Chips: systems we connect (dark section) */
.ap-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.ap-chips li {
  padding: 10px 16px;
  border: 1px solid rgba(254, 200, 61, 0.55);
  border-radius: var(--r);
  background: rgba(1, 255, 65, 0.06);
  color: var(--white);
  font-weight: 700;
  font-size: 0.95rem;
}
.sec--dark .ap-lead-dark,
.sec--dark .ap-note-dark {
  color: var(--white);
}
.sec--dark .ap-note-dark a {
  color: var(--green);
}

/* Worked example bars (cost page). Widths are to scale: 63,940 / 120,000 = 53.3% */
.ap-bars {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-top: 8px;
}
.ap-bar-row {
  display: grid;
  gap: 6px;
}
.ap-bar-label {
  font-weight: 800;
  color: var(--text);
}
.ap-bar {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--r);
  font-variant-numeric: tabular-nums;
}
.ap-bar b {
  font-size: 1.1rem;
  font-weight: 800;
}
.ap-bar--saas {
  width: 100%;
  background: var(--ink);
  color: var(--white);
}
.ap-bar--custom {
  width: 53.3%;
  min-width: 140px;
  background: var(--green);
  color: var(--ink);
}
.ap-bar-row small {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.ap-table thead th small {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Wide illustration (before/after) */
.ap-wide {
  width: 100%;
  height: auto;
  margin: 8px 0 24px;
  border: 1px solid rgba(1, 255, 65, 0.22);
  border-radius: var(--r-card);
  background: var(--ink);
}
/* Before / After boxes on a dark section */
.ap-two--dark .ap-box {
  background: var(--bg-3);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: var(--white);
}
.ap-two--dark .ap-box h3 {
  color: var(--white);
}
.ap-two--dark .ap-box:last-child {
  border-color: rgba(1, 255, 65, 0.45);
}
.ap-two--dark .ap-box:last-child h3 {
  color: var(--green);
}

/* Lists */
.ap-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin: 8px 0 0;
  padding-left: 20px;
  max-width: 1080px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}
.ap-list li::marker {
  color: var(--green-d);
}
.ap-note {
  margin-top: 20px;
  max-width: 760px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.ap-note a,
.ap-p a,
.ap-box a,
.wyg-title a {
  color: var(--green-d);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ap-h3 {
  margin: 36px 0 10px;
  font-size: 1.3rem;
}
.ap-p {
  max-width: 760px;
  margin-top: 14px;
  font-size: 1.02rem;
  color: var(--text);
}

/* Tables: scroll inside their own box on phones */
.ap-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
}
.ap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
  color: var(--text);
}
.ap-table caption {
  caption-side: bottom;
  text-align: left;
  padding: 12px 18px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}
.ap-table th,
.ap-table td {
  padding: 14px 18px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.ap-table thead th {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--white);
  border-bottom: 0;
}
.ap-table tbody th {
  font-weight: 800;
}
.ap-table tbody th small {
  display: block;
  margin-top: 2px;
  font-size: 0.82rem;
  font-weight: 600;
}
.ap-table .n {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.ap-table tbody tr:last-child th,
.ap-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Two boxes side by side */
.ap-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 8px;
}
.ap-box {
  padding: 26px 24px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  color: var(--text);
}
.ap-box h3 {
  margin-bottom: 10px;
  font-size: 1.25rem;
}
.ap-box ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
  font-weight: 600;
}

@media (max-width: 960px) {
  .ap-prices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .ap-table {
    font-size: 0.9rem;
  }
  .ap-table th,
  .ap-table td {
    padding: 11px 10px;
  }
  .ap-table .n {
    white-space: normal;
  }
  .ap-table--saas tr > :nth-child(3) {
    display: none;
  }
  .ap-prices,
  .ap-list,
  .ap-two {
    grid-template-columns: 1fr;
  }
}

/* Buttons inside prose blocks keep their own colors (the prose link style made the text green on green) */
.prose a.btn--accent,
.prose a.btn--accent:hover {
  color: var(--ink);
  text-decoration: none;
}
.prose a.btn--ghost,
.prose a.btn--ghost:hover {
  color: var(--white);
  text-decoration: none;
}

/* ---- All /apps/ pages, Look C (2026-11-07): square boxes with gold corners, like the home page.
   Started on the industry pages, now on every /apps/ page. ---- */
html[data-page~="apps"] :is(.ap-card, .ap-price, .ap-box, .ap-table-wrap, .wd-steps li, .ap-split img) {
  position: relative;
  border-radius: 0;
}
html[data-page~="apps"] :is(.ap-card, .ap-price, .ap-box, .ap-table-wrap, .wd-steps li)::after {
  content: "";
  position: absolute;
  inset: 4px;
  pointer-events: none;
  z-index: 3;
  color: #e0a107;
  background:
    linear-gradient(currentColor, currentColor) left top / 12px 2px,
    linear-gradient(currentColor, currentColor) left top / 2px 12px,
    linear-gradient(currentColor, currentColor) right top / 12px 2px,
    linear-gradient(currentColor, currentColor) right top / 2px 12px,
    linear-gradient(currentColor, currentColor) left bottom / 12px 2px,
    linear-gradient(currentColor, currentColor) left bottom / 2px 12px,
    linear-gradient(currentColor, currentColor) right bottom / 12px 2px,
    linear-gradient(currentColor, currentColor) right bottom / 2px 12px;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 4px rgba(224, 161, 7, 0.45));
}
html[data-page~="apps"] .sec--dark :is(.ap-card, .ap-price, .ap-box, .ap-table-wrap, .wd-steps li)::after {
  color: #fec83d;
  filter: drop-shadow(0 0 4px rgba(254, 200, 61, 0.7));
}
/* no gray text */
html[data-page~="apps"] .sec:not(.sec--dark) .wd-steps span,
html[data-page~="apps"] .sec:not(.sec--dark) .ap-price small,
html[data-page~="apps"] .sec:not(.sec--dark) :is(.wd-lead, .ap-p, .ap-note, .ap-list li, .faq-row p) {
  color: var(--ink);
}
