/* Shared book table for / and /pricing/. One copy so the two pages cannot drift. */

.hai-page .hai-compare-wrap {
  overflow-x: visible;
  margin: 8px 0 0;
}
.hai-page .hai-compare {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
.hai-page .hai-compare .vh,
.hai-page .hai-plan-cards .vh {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  font-size: 0;
}
.hai-page .hai-compare thead th {
  position: relative;
  vertical-align: top;
  text-align: left;
  font-weight: 600;
  padding: 12px 12px 14px 0;
  border: 0;
  border-top: 1px solid hsl(var(--foreground));
  border-bottom: 3px double hsl(var(--foreground));
  background: transparent;
  color: hsl(var(--foreground));
  font-family: inherit;
}
.hai-page .hai-compare thead th:first-child,
.hai-page .hai-compare tbody th {
  width: 10rem;
}
.hai-page .hai-compare thead th[data-plan] {
  width: calc((100% - 10rem) / 5);
}
.hai-page .hai-compare tbody th {
  position: relative;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  vertical-align: baseline;
  padding: 11px 12px 11px 0;
  border: 0;
  border-bottom: 1px solid hsl(var(--rule));
  color: hsl(var(--foreground));
  background: transparent;
}
.hai-page .hai-compare td {
  position: relative;
  vertical-align: baseline;
  text-align: left;
  padding: 11px 10px 11px 0;
  border: 0;
  border-bottom: 1px solid hsl(var(--rule));
  font-size: 15.5px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  background: transparent;
  color: hsl(var(--foreground));
}
.hai-page .hai-compare tbody tr:last-child th,
.hai-page .hai-compare tbody tr:last-child td {
  border-bottom: 1.5px solid hsl(var(--foreground));
}
.hai-page .hai-compare thead th.c-reg,
.hai-page .hai-compare td.c-reg {
  z-index: 0;
  background: transparent;
}
.hai-page .hai-compare thead th.c-reg::before,
.hai-page .hai-compare td.c-reg::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--primary) / 0.10);
  pointer-events: none;
}
.hai-page.dark .hai-compare thead th.c-reg::before,
.hai-page.dark .hai-compare td.c-reg::before {
  background: hsl(var(--primary) / 0.28);
}
.hai-page .hai-compare .plan-name {
  display: block;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 22px;
  height: 22px;
  white-space: nowrap;
}
.hai-page .hai-compare .price {
  display: block;
  margin: 6px 0 0;
  font-size: 14.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 18px;
  white-space: nowrap;
}
.hai-page .hai-compare .status {
  display: block;
  margin: 6px 0 0;
  font-style: italic;
  font-weight: 400;
  font-size: 12.5px;
  color: hsl(var(--muted-foreground));
  line-height: 1.3;
}
.hai-page .hai-compare .badge,
.hai-page .hai-plan-card .badge {
  display: inline-block;
  max-width: none;
  margin-top: 6px;
  white-space: nowrap;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
  color: hsl(var(--accent-foreground));
  background: hsl(var(--accent));
  border-radius: 999px;
  padding: 2px 7px;
  vertical-align: middle;
}
.hai-page .hai-compare .pair {
  display: block;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.hai-page .hai-compare .fig {
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.hai-page .hai-compare .included,
.hai-page .hai-plan-card .included {
  font-style: italic;
  color: hsl(var(--muted-foreground));
  font-size: 0.95em;
}
.hai-page .hai-compare .tick,
.hai-page .hai-plan-card .tick {
  display: inline-block;
  width: 0.38em;
  height: 0.68em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(40deg);
  margin: 0 0.55em 0.12em 0.4em;
}
.hai-page .hai-compare .dash,
.hai-page .hai-plan-card .dash {
  color: hsl(var(--muted-foreground));
  font-size: 1.05em;
  line-height: 1;
}
.hai-page .hai-compare-caption {
  text-align: left;
  max-width: none;
  font-size: 13px;
  line-height: 1.5;
  color: hsl(var(--muted-foreground));
  margin: 16px 0 18px;
}
/* Match the pricing page's paragraph margin above the table. */
.hai-page .hai-anchor {
  margin-bottom: 16px;
}
@media (min-width: 641px) {
  .hai-page .hai-compare-wrap,
  .hai-page .hai-compare-caption {
    width: min(1180px, calc(100vw - 80px));
    max-width: min(1180px, calc(100vw - 80px));
    margin-left: calc((100% - min(1180px, 100vw - 80px)) / 2);
    margin-right: calc((100% - min(1180px, 100vw - 80px)) / 2);
  }
  /* Every plan column gets the same 10px inset, so text never sits on the Regular band's edge. */
  .hai-page .hai-compare thead th[data-plan],
  .hai-page .hai-compare td {
    padding-left: 10px;
  }
}

.hai-plan-cards { display: none; }

@media (max-width: 640px) {
  .hai-plan-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 0 18px;
  }
  .hai-plan-card {
    min-width: 0;
    padding: 12px 2px 2px;
    border: 0;
    border-top: 1px solid hsl(var(--foreground));
    border-bottom: 1.5px solid hsl(var(--foreground));
    background: transparent;
    box-shadow: none;
  }
  .hai-plan-card--regular {
    background: hsl(var(--primary) / 0.10);
    padding-left: 10px;
    padding-right: 10px;
  }
  .hai-page.dark .hai-plan-card--regular {
    background: hsl(var(--primary) / 0.28);
  }
  .hai-plan-card .plan-name {
    display: block;
    height: auto;
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    color: hsl(var(--foreground));
    background: transparent;
    font-family: inherit;
  }
  .hai-plan-card .price {
    display: block;
    margin: 6px 0 8px;
    font-size: 16px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    color: hsl(var(--foreground));
  }
  .hai-plan-card .status {
    display: block;
    margin: 0 0 8px;
    font-style: italic;
    font-weight: 400;
    font-size: 12.5px;
    color: hsl(var(--muted-foreground));
    line-height: 1.3;
  }
  .hai-plan-card .badge { margin: 0 0 10px; }
  .hai-plan-card dl { margin: 0; }
  .hai-plan-card-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    border-top: 1px solid hsl(var(--rule));
    padding: 8px 0;
    min-width: 0;
  }
  .hai-plan-card dt {
    margin: 0;
    min-width: 0;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: hsl(var(--foreground));
  }
  .hai-plan-card dd {
    position: relative;
    margin: 0;
    min-width: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 15px;
    line-height: 1.35;
    color: hsl(var(--foreground));
    padding-right: 6px;
    overflow-wrap: break-word;
  }
  .hai-plan-card .pair { display: block; text-align: right; }
  .hai-compare-wrap { display: none; }
  .hai-page .hai-compare-caption {
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px;
  }
}
