/* Public website repairs: keep grid tracks inside narrow phone viewports. */
.hero .wrap > *, .feat > *, .price > *, .cats3 > * { min-width: 0; }
.feat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.price { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.cats3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.phone { width: min(300px, 100%); }
.btn { min-height: 44px; }
.themebtn { width: 44px; height: 44px; }

/* Secondary labels still need readable contrast in both themes. */
:root, :root[data-theme="light"] { --ink3: #656c72; --green: #087b58; --amber: #956104; }
@media (prefers-color-scheme: dark) {
  :root { --ink3: #a0a7a0; --green: #33c390; --amber: #e0a63c; }
}
:root[data-theme="dark"] { --ink3: #a0a7a0; --green: #33c390; --amber: #e0a63c; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .feat, .feat.rev { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .price { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  nav .wrap { gap: 8px; }
  nav .brand { gap: 3px; flex-shrink: 0; }
  nav .sp { min-width: 0; }
  nav .btn.sm { padding: 8px 10px; flex-shrink: 0; }
  .cta .btn { width: 100%; white-space: normal; }
  .plan .btn { white-space: normal; padding-inline: 12px; }
  .plan .amt { flex-wrap: wrap; }
  .cats3 { grid-template-columns: minmax(0, 1fr); }
  .c3 { display: flex; align-items: baseline; gap: 14px; }
  .c3 .t { overflow-wrap: anywhere; }
  .demo { overflow-wrap: anywhere; }
  #subemail { min-width: 0 !important; width: 100%; }
}
/* Keep the wordmark and both app actions usable on narrow phones. */
@media (max-width: 520px) {
  nav .wrap { padding-inline: 16px; gap: 6px; }
  nav .brand { font-size: 17px; letter-spacing: 0; }
  nav .brand .ipa { display: none; }
  nav .themebtn { flex: 0 0 44px; }
  nav .lnk.signin { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; white-space: nowrap; }
  nav .btn.sm { font-size: 12px; padding-inline: 10px; }
}
