/* Packages: one table. Each package heads its own column, so nothing repeats. */
.tiers {
  --cols: minmax(0, 1.25fr) repeat(4, minmax(0, 1fr));
  --sticky-top: 82px;
  --added: #1f6bb81a;
  margin-top: 60px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: clip;
}
.tier-table { display: block; width: 100%; border-collapse: separate; }
.tier-table thead,
.tier-table tbody { display: block; }
.tier-table tr { display: grid; grid-template-columns: var(--cols); }
.tier-table tbody tr { border-top: 1px solid var(--line); }

/* Column heads */
.tier-legend {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 26px 24px;
  text-align: left;
}
.tier-legend-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -.01em;
}
.tier-legend-key {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.tier-legend-key i {
  flex: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--added);
}
.tier {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 24px 20px 20px;
  text-align: left;
  font-weight: 400;
  border-left: 1px solid var(--line);
}
.tier-kind { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: var(--blue); }
.tier h3 {
  margin-top: 12px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(38px, 3.2vw, 50px);
  line-height: .95;
  letter-spacing: -.02em;
}
.tier-price { display: flex; flex-direction: column; margin-top: 14px; }
.tier-price strong {
  font-size: clamp(26px, 2.2vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.05em;
  white-space: nowrap;
}
.tier-price span { margin-top: 4px; font-size: 11px; color: var(--muted); }
.tier-lead {
  flex: 1;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.tier > .button {
  width: 100%;
  margin-top: 20px;
  min-height: 46px;
  padding: 12px 14px;
  font-size: 12px;
  border-radius: 8px;
}
.tier > .button .icon { width: 15px; height: 15px; }
.tier.is-featured { color: white; background: var(--blue); border-left-color: var(--blue); }
.tier.is-featured .tier-kind,
.tier.is-featured .tier-price span { color: #eaf3fc; }
.tier.is-featured .tier-lead { border-top-color: #ffffff40; }

/* Rows */
.tier-table .tier-names { display: none; }
.tier-table tbody th[scope="row"] {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
}
.tier-table td {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 10px 8px;
  font-size: 14px;
  text-align: center;
  border-left: 1px solid var(--line);
}
.tier-table td .icon { width: 20px; height: 20px; color: var(--blue); stroke-width: 2; }
.tier-no { color: #9aa6b0; }
.tier-table td.is-new { font-weight: 700; color: var(--blue); background: var(--added); }
.tier-table td.is-new .icon { stroke-width: 2.6; }
.tier-new {
  margin-top: 3px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tier-group th {
  grid-column: 1 / -1;
  padding: 8px 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: left;
  color: #33414c;
  background: #e3e9ee;
}
.tier-group th span { margin-left: 10px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.tier-common td {
  grid-column: 2 / -1;
  align-items: flex-start;
  padding: 16px 20px;
}
.tier-common ul { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; margin: 0; padding: 0; }
.tier-common li { display: flex; align-items: center; gap: 8px; font-size: 13px; text-align: left; }
.tier-common .icon { width: 17px; height: 17px; }

@media (max-width: 1100px) {
  .tiers { --cols: repeat(4, minmax(0, 1fr)); }
  .tier-legend { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 18px 18px; border-bottom: 1px solid var(--line); }
  .tier-legend-title { font-size: 20px; }
  .tier { padding: 20px 16px 16px; }
  .tier:nth-child(2) { border-left: 0; }
  .tier-lead { font-size: 13px; }
  .tier-table tbody th[scope="row"] { grid-column: 1 / -1; padding: 14px 16px 2px; }
  .tier-table td { min-height: 48px; }
  .tier-table td[data-plan="Lean"] { border-left: 0; }
  .tier-group th { padding: 7px 16px; }
  .tier-common td { grid-column: 1 / -1; padding: 8px 16px 16px; border-left: 0; }
}
@media (max-width: 767px) {
  .tiers { --sticky-top: 82px; margin-top: 40px; border-radius: 16px; }
  .tier-table thead tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier-legend { padding: 16px 14px; }
  .tier-legend-title { font-size: 18px; }
  .tier { padding: 18px 14px 14px; border-left: 0; border-top: 1px solid var(--line); }
  .tier:nth-child(odd) { border-left: 1px solid var(--line); }
  .tier.is-featured { border-top-color: var(--blue); }
  .tier h3 { font-size: 36px; }
  .tier-price strong { font-size: 25px; }
  .tier-lead { margin-top: 12px; padding-top: 12px; font-size: 12px; }
  .tier > .button { margin-top: 14px; padding: 11px 10px; font-size: 11px; }
  /* With the heads in a 2×2 grid, a slim row of names keeps each value under its package. */
  .tier-table .tier-names {
    display: grid;
    position: sticky;
    top: var(--sticky-top);
    z-index: 2;
    background: white;
    border-bottom: 1px solid var(--ink);
  }
  .tier-table .tier-names td:first-child { display: none; }
  .tier-table .tier-names td {
    min-height: 0;
    padding: 10px 4px;
    font-family: var(--display);
    font-weight: 800;
    font-size: 17px;
  }
  .tier-table tbody th[scope="row"] { padding: 14px 14px 2px; font-size: 13px; }
  .tier-table td { padding: 8px 4px; font-size: 12px; }
  .tier-new { font-size: 9px; }
  .tier-group th { padding: 6px 14px; }
  .tier-common td { padding: 8px 14px 16px; }
  .tier-common ul { flex-direction: column; gap: 8px; }
}
@media (max-width: 600px) {
  .tiers { --sticky-top: 72px; }
}
