/* ==========================================================================
   Home closing section (Terminal Light, prototypes/Home): pixel field with
   edge bias, intro, walkthrough video, Free / Pro / Creator plans, iOS strip.
   ========================================================================== */
.home-plans {
  position: relative; overflow: hidden; padding: 88px 28px 72px;
  border-top: 1px solid var(--tl-line-07); color: var(--tl-ink);
  scroll-margin-top: var(--tl-topbar-h);
}
.home-plans > canvas.hp-field { position: absolute; left: 0; top: 0; opacity: var(--tl-field-opacity-edges); pointer-events: none; }
.hp-inner { position: relative; max-width: 1180px; margin: 0 auto; }
.home-plans a { color: inherit; text-decoration: none; }
.home-plans img { background: transparent; }

.hp-intro { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.hp-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 6px; margin-bottom: 22px;
  border-radius: 999px; background: var(--tl-card); box-shadow: 0 0 0 1px var(--tl-line-08);
  font-family: var(--tl-mono); font-size: 11px; letter-spacing: 0.6px; color: var(--tl-ink-60);
}
.hp-pill img { width: 18px; height: 18px; border-radius: 5px; }
.home-plans h2 { margin: 0 0 18px; font-size: 64px; font-weight: 700; letter-spacing: -2.6px; line-height: 1; color: var(--tl-ink); }
.hp-intro p { margin: 0 auto; max-width: 560px; font-size: 16.5px; line-height: 1.6; color: var(--tl-ink-60); text-wrap: pretty; }

.hp-btn {
  height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 9px; border: 1px solid var(--tl-line-12); background: var(--tl-card-bg);
  font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--tl-ink);
}
.home-plans .hp-btn:hover { background: var(--tl-control); color: var(--tl-ink); }
.home-plans .hp-btn.is-ink { padding: 0 18px; border-color: var(--tl-ink); background: var(--tl-ink); color: var(--tl-on-ink); font-weight: 600; }
.home-plans .hp-btn.is-ink:hover { background: var(--tl-ink-hover); border-color: var(--tl-ink-hover); color: var(--tl-on-ink); }
.hp-btn.is-block { display: flex; width: 100%; height: 38px; border-radius: var(--tl-r-btn); font-size: 13.5px; font-weight: 600; background: var(--tl-control); }
.hp-btn.is-lg { height: 38px; border-radius: var(--tl-r-btn); font-size: 13.5px; }

.hp-video {
  padding: 8px; margin-bottom: 14px;
  border-radius: var(--tl-r-card); border: 1px solid var(--tl-line-07);
  background: var(--tl-card-bg); box-shadow: var(--tl-card-shadow);
}
.hp-video-frame { position: relative; aspect-ratio: 16 / 7.2; border-radius: 6px; overflow: hidden; background: #0b0d10; }
.hp-video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hp-video-frame.is-playing video { object-fit: contain; }
.hp-video-pill {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  height: 44px; padding: 0 18px 0 8px; margin: 0; width: auto; display: inline-flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: #101418;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); font: 600 13.5px var(--tl-font); cursor: pointer;
}
.hp-video-pill:focus-visible { outline: none; box-shadow: 0 0 0 2px #101418, 0 0 0 4px #fff; }
.hp-video-play { width: 30px; height: 30px; border-radius: 50%; background: #101418; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.hp-video-play svg { margin-left: 2px; }
.hp-video-frame.is-playing .hp-video-pill { display: none; }

.hp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.hp-plans.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hp-plan {
  display: flex; flex-direction: column;
  border-radius: var(--tl-r-card); border: 1px solid var(--tl-line-07);
  background: var(--tl-card-bg); box-shadow: var(--tl-card-shadow);
}
.hp-plan-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px 12px; border-bottom: 1px solid var(--tl-line-06); }
.hp-plan-head .spacer { flex: 1; }
.home-plans h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.2px; line-height: 1.3; color: var(--tl-ink); }
.hp-plan-sub { font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.4px; color: var(--tl-ink-50); white-space: nowrap; }
.hp-plan-body { flex: 1; display: flex; flex-direction: column; padding: 18px; }
.hp-price { font-size: 34px; font-weight: 300; letter-spacing: -1.2px; line-height: 1; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.hp-plan-dek { margin: 0 0 18px; font-size: 13.5px; line-height: 1.5; color: var(--tl-ink-60); }
.hp-plan ul { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.hp-plan li {
  list-style: none; margin: 0; padding: 0 0 0 24px; position: relative;
  font-size: 13.5px; line-height: 1.45; color: var(--tl-ink);
}
.hp-plan li::before {
  content: ''; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px;
  background: var(--tl-ink-55);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5L13.5 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8.5l3.5 3.5L13.5 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hp-ios {
  display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 16px;
  border-radius: var(--tl-r-card); border: 1px solid var(--tl-line-07);
  background: var(--tl-card-bg); box-shadow: var(--tl-card-shadow);
}
.hp-ios > img { flex: none; width: 44px; height: 44px; border-radius: 11px; }
.hp-ios-copy { flex: 1; min-width: 0; }
.hp-ios-copy h3 { margin-bottom: 2px; }
.hp-ios-copy p { margin: 0; font-size: 13px; color: var(--tl-ink-55); }

@media (max-width: 1100px) {
  .home-plans h2 { font-size: 48px; letter-spacing: -1.8px; }
  .hp-plans, .hp-plans.is-two { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .home-plans { padding: 56px 16px 48px; }
  .home-plans h2 { font-size: 36px; letter-spacing: -1.2px; }
  .hp-intro p { font-size: 15px; }
  .hp-video-frame { aspect-ratio: 16 / 9; }
  .hp-ios { flex-wrap: wrap; }
  .hp-ios .hp-btn { width: 100%; }
}

/* Signed-in Free: the Free card marks the current plan instead of linking. */
.hp-btn.is-current { cursor: default; background: transparent; border-style: dashed; color: var(--tl-ink-50); font-weight: 500; }

/* Pro members: their benefits instead of the plans, each a link to where it
   lives (home-plans.html hp_perks). */
.hp-perks {
  margin-bottom: 14px; border-radius: var(--tl-r-card); border: 1px solid var(--tl-line-07);
  background: var(--tl-card-bg); box-shadow: var(--tl-card-shadow);
}
.hp-perks-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; border-bottom: 1px solid var(--tl-line-06);
}
.hp-perks-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hp-perks-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--tl-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tl-ink-50);
}
.hp-perks-eyebrow .tl-pro-tag, .hp-tag {
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.04em; line-height: 1; padding: 3px 5px; border-radius: var(--tl-r-tag);
}
.hp-tag { border: 1px solid var(--tl-line-14); background: var(--tl-fill-04); color: var(--tl-ink-70); }
.home-plans .hp-perks h3 { font-size: 18px; letter-spacing: -0.3px; }
.hp-perks-head .hp-btn { height: 34px; font-size: 13px; }
.hp-perk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hp-perk {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px;
  border-right: 1px solid var(--tl-line-06); border-bottom: 1px solid var(--tl-line-06);
  transition: background 0.15s var(--tl-ease);
}
.hp-perk:nth-child(3n) { border-right: 0; }
.hp-perk:nth-last-child(-n+3):nth-child(3n+1), .hp-perk:nth-last-child(-n+3):nth-child(3n+1) ~ .hp-perk { border-bottom: 0; }
.home-plans .hp-perk:hover { background: var(--tl-fill-03); }
.hp-perk-name { font-size: 14px; font-weight: 600; color: var(--tl-ink); }
.hp-perk-dek { flex: 1; font-size: 13px; line-height: 1.5; color: var(--tl-ink-60); }
.hp-perk-go { margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--tl-ink-60); }
.home-plans .hp-perk:hover .hp-perk-go { color: var(--tl-ink); }
@media (max-width: 900px) {
  .hp-perk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hp-perk, .hp-perk:nth-child(3n) { border-right: 1px solid var(--tl-line-06); border-bottom: 1px solid var(--tl-line-06); }
  .hp-perk:nth-child(2n) { border-right: 0; }
  .hp-perk:nth-last-child(-n+3):nth-child(3n+1) ~ .hp-perk, .hp-perk:nth-last-child(-n+3):nth-child(3n+1) { border-bottom: 1px solid var(--tl-line-06); }
  .hp-perk:nth-last-child(-n+2):nth-child(2n+1), .hp-perk:nth-last-child(-n+2):nth-child(2n+1) ~ .hp-perk { border-bottom: 0; }
}
@media (max-width: 560px) {
  .hp-perks-head { flex-direction: column; align-items: flex-start; }
  .hp-perk-grid { grid-template-columns: 1fr; }
  .hp-perk, .hp-perk:nth-child(2n), .hp-perk:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--tl-line-06) !important; }
  .hp-perk:last-child { border-bottom: 0 !important; }
}
