:root {
  --bg: #f7f8f3;
  --surface: #ffffff;
  --surface-2: #eef5ec;
  --ink: #18211d;
  --muted: #5f6c65;
  --line: #dfe7dd;
  --border: var(--line);
  --green: #20865d;
  --green-dark: #146346;
  --coral: #e76f51;
  --gold: #e0a62d;
  --blue: #2f6f9f;
  --shadow: 0 16px 40px rgba(24, 33, 29, 0.08);
  --container-max: 1160px;
  --content-gutter: clamp(24px, 4vw, 64px);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--green-dark);
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

main {
  min-height: 60vh;
}

.site-header,
.site-footer,
.section,
.page-hero,
.hero,
.profile-hero,
.share-band {
  width: min(var(--container-max), calc(100% - var(--content-gutter)));
  margin: 0 auto;
}

body:not(.app-page) main > .panel,
body:not(.app-page) main > .table-card,
body:not(.app-page) main > .plan-grid,
body:not(.app-page) main > .creator-grid,
body:not(.app-page) main > .blog-grid {
  width: min(var(--container-max), calc(100% - var(--content-gutter)));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 0.82rem;
}

.site-nav,
.header-actions,
.hero-actions,
.card-meta,
.app-topbar,
.row-heading,
.share-band {
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.94rem;
}

.button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--green);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.button:hover {
  color: #fff;
  background: var(--green-dark);
  transform: translateY(-1px);
}

.button-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.button-ghost:hover {
  color: var(--green-dark);
  background: var(--surface);
  border-color: var(--green);
}

.button-large {
  min-height: 50px;
  padding-inline: 20px;
}

.flash-wrap {
  width: min(var(--container-max), calc(100% - var(--content-gutter)));
  margin: 0 auto;
}

.alert {
  border-radius: 8px;
  padding: 14px 16px;
  margin: 12px 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.alert ul {
  margin: 8px 0 0 18px;
  padding: 0;
}

.alert-success {
  border-color: #b7dfc8;
  background: #eefaf3;
  color: #145f3f;
}

.alert-error {
  border-color: #f1b5a7;
  background: #fff1ed;
  color: #9c341c;
}

.alert-notice {
  border-color: #efd48c;
  background: #fff8df;
  color: #73531a;
}

.hero {
  min-height: calc(100vh - 132px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  gap: 46px;
  align-items: center;
  padding: 34px 0 56px;
}

.home-hero {
  width: 100%;
  min-height: 78vh;
  display: grid;
  align-items: end;
  background-size: cover;
  background-position: center center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 14px;
}

.home-hero-inner {
  width: min(var(--container-max), calc(100% - var(--content-gutter)));
  margin: 0 auto;
  padding: 84px 0 72px;
  color: #fff;
}

.home-hero-inner h1 {
  font-size: 3.3rem;
  line-height: 1.02;
  margin: 0 0 18px;
  max-width: 920px;
}

.home-hero-inner p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  margin-bottom: 0;
}

.home-hero .eyebrow {
  color: #f7b267;
}

.home-hero .button-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.04);
}

.home-hero .button-ghost:hover {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.14);
}

.hero h1,
.page-hero h1,
.profile-hero h1 {
  font-size: clamp(2.5rem, 4.4rem, 4.4rem);
  line-height: 1;
  margin: 0 0 20px;
  letter-spacing: 0;
}

.hero-text,
.page-hero p,
.profile-hero p,
.section-heading p,
.split-section p,
.pricing-teaser p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.planner-preview,
.panel,
.feature-card,
.plan-card,
.creator-card,
.blog-card,
.price-card,
.auth-card,
.install-card,
.day-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.planner-preview {
  padding: 22px;
}

.preview-header,
.meal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.preview-header strong {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--green-dark);
}

.meal-row span,
.card-meta,
.metric-grid span,
.metric-grid small,
.table-list strong,
.micro-strip,
.target-preview,
.site-footer p {
  color: var(--muted);
}

.macro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.macro-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.macro-grid div,
.metric-grid article {
  min-height: 94px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fbfcf8;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.macro-grid strong,
.metric-grid strong {
  font-size: 1.6rem;
  line-height: 1;
}

.hidden {
  display: none !important;
}

.skeleton-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcf8;
}

.skeleton-line {
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e8ede7 20%, #f4f7f2 50%, #e8ede7 80%);
  background-size: 180% 100%;
  animation: skeletonPulse 1.1s ease-in-out infinite;
  margin-bottom: 8px;
}

.skeleton-line:last-child {
  margin-bottom: 0;
}

.is-loading {
  opacity: 0.8;
}

@keyframes skeletonPulse {
  0% { background-position: 180% 0; }
  100% { background-position: -20% 0; }
}

.micro-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
}

.micro-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface-2);
  font-weight: 650;
}

.stats-band {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}

.stats-band div {
  min-height: 126px;
  padding: 26px 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stats-band strong {
  font-size: 2rem;
}

.stats-band span {
  color: var(--muted);
}

.section {
  padding: 68px 0;
}

.section.section-compact {
  padding-top: 16px;
  padding-bottom: 28px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.split-section h2,
.pricing-teaser h2,
.dashboard-head h1 {
  font-size: 2rem;
  line-height: 1.12;
  margin: 0;
}

.feature-grid,
.pricing-grid,
.plan-grid,
.creator-grid,
.blog-grid,
.metric-grid,
.admin-grid,
.plan-detail-grid,
.generate-layout {
  display: grid;
  gap: 18px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.case-study-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.case-study-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.case-study-card p {
  color: var(--muted);
  margin: 0 0 10px;
}

.case-study-card p strong {
  color: var(--ink);
}

.case-benefits {
  margin: 0 0 0 18px;
  padding: 0;
  color: var(--muted);
}

.case-benefits li {
  margin-bottom: 6px;
}

.feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.plan-card,
.creator-card,
.blog-card,
.price-card,
.panel {
  padding: 20px;
}

.feature-card h3,
.plan-card h2,
.plan-card h3,
.blog-card h2,
.creator-card h2,
.price-card h2,
.panel h2,
.day-panel h3 {
  margin-top: 0;
}

.feature-card p,
.plan-card p,
.creator-card p,
.blog-card p,
.price-card li,
.panel p,
.auth-alt,
.empty-state p {
  color: var(--muted);
}

.plan-card img,
.blog-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
}

.split-section,
.pricing-teaser,
.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  gap: 30px;
  align-items: center;
}

.community-list {
  display: grid;
  gap: 10px;
}

.community-list div,
.table-list a,
.table-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.community-list div {
  flex-direction: column;
}

.community-list span,
.community-list em {
  color: var(--muted);
  font-style: normal;
}

.pricing-teaser {
  background: var(--surface-2);
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 46px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.site-footer p {
  max-width: 760px;
  margin-bottom: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
}

.page-hero {
  padding: 56px 0 18px;
}

.compact-hero h1 {
  max-width: 820px;
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price {
  font-size: 2.2rem;
  font-weight: 850;
  margin: 8px 0 14px;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
}

.clean-list {
  min-height: 130px;
  margin: 0 0 18px 18px;
  padding: 0;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background:
    linear-gradient(135deg, rgba(32, 134, 93, 0.12), rgba(231, 111, 81, 0.08)),
    var(--bg);
}

.auth-shell,
.install-shell {
  width: min(100%, 500px);
}

.install-shell {
  width: min(100%, 920px);
}

.auth-brand {
  margin-bottom: 18px;
}

.auth-card,
.install-card {
  padding: 28px;
}

.auth-card h1,
.install-card h1 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wide-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.auth-alt {
  margin-bottom: 0;
}

.app-page {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.app-sidebar {
  min-height: 100vh;
  background: #18211d;
  color: #fff;
  padding: 24px;
  position: sticky;
  top: 0;
}

.app-sidebar .brand,
.app-sidebar .side-nav a {
  color: #fff;
}

.admin-sidebar {
  background: #24382f;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.nav-section {
  margin: 16px 0 2px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.side-nav a {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.side-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.app-main {
  min-width: 0;
}

.app-topbar {
  min-height: 76px;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(24, 33, 29, 0.05);
}

.app-topbar div {
  display: grid;
}

.app-content {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 30px 0 70px;
}

.dashboard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.dashboard-head p {
  max-width: 820px;
  color: var(--muted);
}

.metric-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.in-app-section {
  width: min(var(--container-max), calc(100% - var(--content-gutter)));
  margin-inline: auto;
  padding: 36px 0 0;
}

.plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.creator-grid,
.blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-meta {
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.creator-card .avatar,
.profile-hero .avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-weight: 850;
}

.profile-hero .avatar.large {
  width: 132px;
  height: 132px;
  font-size: 2.6rem;
}

.plan-detail-grid {
  width: min(var(--container-max), calc(100% - var(--content-gutter)));
  margin: 24px auto;
  grid-template-columns: 280px minmax(220px, 0.6fr) minmax(0, 1fr);
}

.score-ring {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--green) 0 88%, var(--line) 88% 100%);
  color: #fff;
  font-weight: 850;
  font-size: 2rem;
  margin: 12px 0;
}

.day-stack {
  display: grid;
  gap: 18px;
}

.day-panel {
  padding: 20px;
}

.meal-detail {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.meal-detail > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.meal-detail span {
  color: var(--coral);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.ingredient-list,
.instruction-list {
  margin: 12px 0 0 20px;
  color: var(--muted);
}

.share-band {
  border-top: 1px solid var(--line);
  padding: 22px 0 72px;
  flex-wrap: wrap;
}

.generate-layout {
  grid-template-columns: 360px minmax(0, 1fr);
}

.target-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcf8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.target-preview strong {
  color: var(--ink);
}

.code-panel {
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111a16;
  color: #ecfff5;
  padding: 18px;
  white-space: pre-wrap;
}

.article-page {
  width: min(900px, calc(100% - var(--content-gutter)));
  margin: 0 auto;
  padding: 70px 0;
}

.article-page h1 {
  font-size: 3rem;
  line-height: 1.08;
  margin: 0 0 18px;
}

.article-body {
  border-top: 1px solid var(--line);
  margin-top: 28px;
  padding-top: 22px;
  color: #27332d;
}

.article-body h2 {
  margin-top: 30px;
}

.article-image {
  margin: 20px 0;
}

.article-image img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.faq-section {
  margin-top: 34px;
}

details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-top: 10px;
  background: var(--surface);
}

summary {
  cursor: pointer;
  font-weight: 800;
}

.admin-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.analytics-grid,
.logs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.logs-grid {
  align-items: start;
}

.analytics-bar {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(120px, 2fr) 56px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.analytics-bar span,
.table-card span,
.timeline-list span {
  color: var(--muted);
}

.analytics-bar div {
  height: 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}

.analytics-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
}

.admin-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 12px;
  margin-bottom: 18px;
}

.table-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-x: auto;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table-card th,
.table-card td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table-card th {
  position: sticky;
  top: 0;
  background: #f8fbf7;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.value-table td:first-child,
.value-table th:first-child {
  min-width: 150px;
}

.cta-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 42px 0;
}

.cta-band h2 {
  margin: 0 0 10px;
}

.cta-band p {
  color: var(--muted);
  margin: 0;
}

.table-card tbody tr:nth-child(even) {
  background: #fbfcf8;
}

.table-card tbody tr:hover {
  background: #f2f8f1;
}

.status-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--surface-2);
  color: var(--green-dark);
  font-weight: 800;
  font-size: 0.78rem;
}

.status-pill.neutral {
  background: #eef1ef;
  color: #33443c;
}

.entity-cell {
  display: grid;
  gap: 4px;
}

.entity-title {
  font-size: 0.96rem;
  line-height: 1.2;
}

.entity-meta {
  color: var(--muted);
  font-size: 0.83rem;
}

.metric-stack {
  display: grid;
  gap: 3px;
}

.metric-stack strong {
  font-size: 0.8rem;
  color: #33443c;
  margin-right: 4px;
}

.metric-chip {
  min-width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f2f8f1;
  font-weight: 700;
  font-size: 0.82rem;
}

.timeline-list {
  display: grid;
  gap: 10px;
}

.timeline-list div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 4px;
  background: #fbfcf8;
}

.small-code {
  max-height: 280px;
  font-size: 0.82rem;
}

.form-subhead {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--green-dark);
  font-weight: 850;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.danger-panel {
  border-color: #f1b5a7;
}

.danger-button {
  background: #b93a1f;
}

.danger-button:hover {
  background: #8f2b16;
}

.coach-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
}

.chat-list {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow: auto;
}

.chat-message {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcf8;
}

.chat-message.user {
  border-color: #b7dfc8;
  background: #eefaf3;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  margin-top: 16px;
}

.table-list {
  display: grid;
  gap: 10px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.check-grid div {
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.check-ok {
  background: #eefaf3;
}

.check-bad {
  background: #fff1ed;
}

.check-line {
  flex-direction: row;
  align-items: center;
}

.check-line input {
  width: 18px;
  min-height: 18px;
}

.empty-state {
  width: min(680px, 100%);
  margin: 44px auto;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 36px;
}

.empty-state.inline {
  margin: 0;
  text-align: left;
}

code {
  background: #eef5ec;
  border-radius: 6px;
  padding: 2px 6px;
}

@media (max-width: 1040px) {
  .hero,
  .split-section,
  .pricing-teaser,
  .profile-hero,
  .generate-layout,
  .plan-detail-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid,
  .home-media-grid,
  .case-study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid,
  .pricing-grid,
  .plan-grid,
  .creator-grid,
  .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid,
  .admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-grid,
  .logs-grid {
    grid-template-columns: 1fr;
  }

  .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .site-nav,
  .header-actions,
  .hero-actions,
  .dashboard-head,
  .site-footer,
  .app-topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav,
  .header-actions {
    width: 100%;
  }

  .site-nav a,
  .header-actions .button,
  .hero-actions .button,
  .hero-actions form,
  .hero-actions button {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding-top: 26px;
  }

  .hero h1,
  .page-hero h1,
  .profile-hero h1,
  .article-page h1 {
    font-size: 2.5rem;
  }

  .home-hero {
    min-height: 72vh;
  }

  .home-hero-inner {
    padding: 62px 0 58px;
  }

  .home-hero-inner h1 {
    font-size: 2.4rem;
  }

  .feature-grid,
  .pricing-grid,
  .plan-grid,
  .creator-grid,
  .blog-grid,
  .metric-grid,
  .admin-metrics,
  .analytics-grid,
  .logs-grid,
  .admin-grid,
  .check-grid,
  .macro-grid {
    grid-template-columns: 1fr;
  }

  .showcase-grid,
  .home-media-grid,
  .case-study-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-page {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    min-height: auto;
    position: static;
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-section {
    grid-column: 1 / -1;
  }

  .form-grid,
  .wide-form {
    grid-template-columns: 1fr;
  }

  .admin-search,
  .analytics-bar,
  .coach-layout,
  .chat-form {
    grid-template-columns: 1fr;
  }

.span-2 {
    grid-column: auto;
  }
}

.compact-button {
  padding: 8px 10px;
  min-height: 34px;
  font-size: 0.85rem;
}

.button-danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.row-actions,
.billing-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.billing-actions {
  margin-top: 12px;
}

.billing-actions select {
  min-width: 120px;
}

.billing-current {
  margin-bottom: 20px;
}

.small-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.food-suggestion-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.food-suggestion-list span {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
}

.media-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.media-strip img {
  width: 140px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.planner-slot {
  min-height: 220px;
}

.bar-chart {
  min-height: 180px;
  display: flex;
  gap: 8px;
  align-items: end;
  overflow-x: auto;
  padding-top: 20px;
}

.bar-chart div {
  min-width: 44px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  align-items: end;
  justify-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

.bar-chart strong {
  display: block;
  width: 22px;
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: var(--green);
}

.progress-canvas {
  width: 100%;
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  margin-bottom: 14px;
}

.progress-track {
  height: 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--green);
}

.badge-grid,
.family-member-list {
  display: grid;
  gap: 10px;
}

.badge-grid div,
.family-member-list details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 12px;
}

.badge-grid strong,
.badge-grid span,
.badge-grid small,
.family-member-list summary span {
  display: block;
}

.family-member-list summary {
  cursor: pointer;
  font-weight: 700;
}

.list-count {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.pagination-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination-bar span {
  color: var(--muted);
  font-size: 0.9rem;
}
