:root {
  --tap-target: 44px;
  --content-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  text-size-adjust: 100%;
}

body {
  margin: 0;
  line-height: 1.5;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

table {
  max-width: 100%;
}

button,
a,
input,
select,
textarea {
  min-height: var(--tap-target);
}

input,
select,
textarea {
  font-size: 16px;
}

.y-container {
  width: min(100% - 32px, var(--content-max));
  margin-inline: auto;
}

.y-responsive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
}

.y-mobile-bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  min-height: 64px;
  background: #fff;
  border-top: 1px solid #e6e2d8;
}

.y-mobile-bottom-nav a {
  display: grid;
  place-items: center;
  padding: 8px;
  color: #222;
  text-decoration: none;
  font-size: 12px;
}

.y-no-overflow {
  min-width: 0;
  overflow-wrap: anywhere;
}

.provider-card,
.price-card,
.panel,
.signup-card,
.account-panel,
.account-metrics article {
  min-width: 0;
  overflow-wrap: anywhere;
}

.provider-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.account-list,
.document-items {
  min-width: 0;
}

.account-list div,
.document-item-row {
  min-width: 0;
}

@media (max-width: 768px) {
  .y-container {
    width: min(100% - 24px, var(--content-max));
  }

  .y-mobile-bottom-nav {
    display: grid;
  }

  .y-desktop-only {
    display: none !important;
  }

  .y-stack-mobile {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body {
    overflow-x: hidden;
  }

  .demo-header {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand {
    font-size: 20px;
  }

  .demo-nav {
    display: none;
  }

  .demo-nav:has([data-logout]) {
    display: flex;
    margin-left: auto;
  }

  .demo-nav:has([data-logout]) a {
    display: none;
  }

  .demo-header > .btn {
    min-height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .hero h1,
  .account-hero-card h1 {
    font-size: 36px;
    line-height: 1.05;
  }

  .hero p,
  .account-hero-card p {
    font-size: 16px;
  }

  .search-box {
    position: relative;
    width: 100%;
    grid-template-columns: 1fr !important;
  }

  .section {
    padding: 36px 0;
  }

  .account-hero-card,
  .signup-card,
  .price-card,
  .account-panel {
    padding: 16px;
  }

  .account-list div {
    grid-template-columns: 1fr;
  }

  .account-list b {
    grid-row: auto;
  }

  .gallery-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .demo-header {
    padding-inline: 18px;
  }

  .demo-nav {
    gap: 12px;
    font-size: 13px;
  }

  .provider-grid,
  .category-row,
  .wedding-summary,
  .wedding-results,
  .account-metrics,
  .quick-actions,
  .account-grid,
  .provider-commercial-panel .account-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wedding-planner-form,
  .account-shell,
  .auth-layout,
  .auth-layout-wide,
  .account-plan-card {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .provider-grid,
  .category-row,
  .wedding-summary,
  .wedding-results,
  .account-metrics,
  .quick-actions,
  .account-grid,
  .two-col,
  .client-plan-choice,
  .provider-plans,
  .provider-commercial-panel .account-list {
    grid-template-columns: 1fr;
  }

  .section-head,
  .premium-teaser,
  .account-hero-card,
  .wedding-result-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .account-hero-actions {
    justify-content: stretch;
  }

  .account-hero-actions .btn,
  .path-actions .btn {
    width: 100%;
  }
}

@media (min-width: 769px) {
  .y-mobile-only {
    display: none !important;
  }
}
