/*
 * EMR pages: the hospitals page's connected-apps section and the /compare
 * pages. Loaded only there, after site.css. Real app screens (assets/screens)
 * keep their own blue inside the frame; everything else is the site palette.
 */

/* ------------------------------------------------------------ phone pair */

.emr-phones {
  position: relative;
  min-height: 34rem;
}
.emr-device {
  --w: clamp(170px, 18vw, 230px);
  position: absolute;
  width: var(--w);
  margin: 0;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.16);
  background: linear-gradient(145deg, #1d3a32, #0b1c17 55%, #16302a);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 40px 80px -20px rgba(14, 42, 35, 0.45);
}
.emr-device img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.13);
  background-color: #fff;
}
.emr-island {
  position: absolute;
  top: calc(var(--w) * 0.058);
  left: 50%;
  width: 30%;
  height: calc(var(--w) * 0.085);
  border-radius: 999px;
  background-color: #050b09;
  transform: translateX(-50%);
}
.emr-device-back {
  top: 0;
  right: 6%;
  transform: rotate(5deg);
}
.emr-device-front {
  bottom: 0;
  left: 8%;
  transform: rotate(-3deg);
  z-index: 1;
}
@media (max-width: 1024px) {
  .emr-phones {
    min-height: 0;
    height: calc(clamp(150px, 38vw, 210px) * 2.6);
    margin-top: 1rem;
  }
  .emr-device {
    --w: clamp(150px, 38vw, 210px);
  }
  .emr-device-back {
    right: 4%;
  }
  .emr-device-front {
    left: 4%;
  }
}

/* ------------------------------------------------------------ compare pages */

.cmp-head {
  padding: clamp(7rem, 12vw, 9rem) 0 clamp(2rem, 5vw, 3rem);
}
.cmp-head .container,
.cmp-body .container {
  max-width: 76rem;
}
.cmp-head h1 {
  max-width: 22ch;
  margin-top: 1rem;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.cmp-head .cmp-lede {
  max-width: 44rem;
  margin-top: 1.1rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}
.cmp-figure {
  margin: clamp(1.8rem, 4vw, 2.6rem) 0 0;
  overflow: hidden;
  border-radius: var(--radius-xl);
  aspect-ratio: 21 / 8;
  background-color: var(--mint);
}
.cmp-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cmp-answer {
  max-width: 48rem;
  margin-top: clamp(2rem, 4vw, 2.8rem);
  padding: 1.3rem 1.5rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background-color: var(--mint-soft);
}
.cmp-answer strong {
  display: block;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.cmp-answer p {
  margin-top: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
}
.cmp-body {
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.cmp-body h2 {
  max-width: 30ch;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  line-height: 1.15;
}
.cmp-body > .container > p,
.cmp-prose p {
  max-width: 46rem;
  margin-top: 1rem;
  line-height: 1.7;
}

/* The comparison itself: a real table on wide screens, labelled rows on phones. */
.cmp-table {
  width: 100%;
  margin-top: 1.6rem;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #fff;
  font-size: 0.97rem;
  line-height: 1.55;
}
.cmp-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.cmp-table th,
.cmp-table td {
  padding: 1rem 1.2rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.cmp-table tr:last-child th,
.cmp-table tr:last-child td {
  border-bottom: 0;
}
.cmp-table thead th {
  background-color: var(--ink-deep);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}
.cmp-table thead th:last-child {
  background-color: var(--accent);
}
.cmp-table tbody th {
  width: 24%;
  font-weight: 600;
  color: var(--ink);
  background-color: var(--paper);
}
.cmp-table td:last-child {
  background-color: var(--mint-soft);
  color: var(--ink);
}
@media (max-width: 760px) {
  .cmp-table,
  .cmp-table tbody,
  .cmp-table tr,
  .cmp-table th,
  .cmp-table td {
    display: block;
    width: 100%;
  }
  .cmp-table thead {
    display: none;
  }
  .cmp-table tr {
    border-bottom: 1px solid var(--line-strong);
  }
  .cmp-table tr:last-child {
    border-bottom: 0;
  }
  .cmp-table tbody th {
    width: 100%;
    border-bottom: 0;
    padding-bottom: 0.4rem;
  }
  .cmp-table td {
    border-bottom: 0;
    padding-top: 0.5rem;
  }
  .cmp-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-family: "Geist Mono", ui-monospace, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .cmp-table td:last-child::before {
    color: var(--accent);
  }
}

.cmp-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
}
.cmp-box {
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: #fff;
}
.cmp-box h3 {
  font-size: 1.1rem;
}
.cmp-box ul {
  display: grid;
  gap: 0.6rem;
  margin: 0.9rem 0 0;
  padding: 0 0 0 1.1rem;
  line-height: 1.55;
}
.cmp-box.is-honest {
  background-color: var(--sand);
  border-color: transparent;
}
@media (max-width: 760px) {
  .cmp-two {
    grid-template-columns: 1fr;
  }
}

.cmp-steps {
  display: grid;
  gap: 1rem;
  max-width: 48rem;
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: s;
}
.cmp-steps li {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 0.6rem;
  counter-increment: s;
  line-height: 1.6;
}
.cmp-steps li::before {
  content: counter(s, decimal-leading-zero);
  padding-top: 0.15rem;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  color: var(--accent);
}
.cmp-steps strong {
  color: var(--ink);
}

.cmp-faq {
  max-width: 48rem;
  margin-top: 1.4rem;
}
.cmp-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  border-radius: var(--radius-xl);
  background-color: var(--ink-deep);
  color: var(--on-dark);
}
.cmp-cta h2 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: #fff;
}
.cmp-cta p {
  margin-top: 0.5rem;
  color: var(--on-dark-muted);
}
.cmp-cta .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.cmp-more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}
.cmp-more a {
  display: block;
  padding: 1.2rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background-color: #fff;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.cmp-more a span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}
@media (hover: hover) {
  .cmp-more a:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
  }
}
@media (max-width: 900px) {
  .cmp-more {
    grid-template-columns: 1fr;
  }
}
.cmp-updated {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
