:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #d8dee8;
  --panel: #ffffff;
  --soft: #f5f7fa;
  --green: #0e7c66;
  --blue: #1d4ed8;
  --red: #c2410c;
  --gold: #b7791f;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #eef2f6;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  background: #101820;
  color: #fff;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  background: #000;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand span,
.sidebar-panel p,
.signal-card small,
.route-card small,
.section-heading .eyebrow,
.eyebrow {
  color: var(--muted);
}

.brand span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-panel {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-panel strong,
.sidebar-panel span {
  display: block;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
}

.search {
  flex: 1;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.search input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.search input {
  min-height: 48px;
  padding: 0 16px;
}

textarea {
  min-height: 136px;
  padding: 14px;
  resize: vertical;
}

.drawer-body label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

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

select {
  min-height: 42px;
  padding: 0 12px;
}

.topbar-actions,
.hero-actions,
.composer-actions,
.provider-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.download-button,
.secondary-link,
.chip {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 750;
}

.download-button,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button {
  background: var(--green);
  color: #fff;
}

.secondary-button,
.download-button,
.chip {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary-link {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.danger-button {
  width: 100%;
  margin-top: 10px;
  background: #d9480f;
  color: #fff;
}

.icon-button {
  width: 42px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 22px;
  align-items: stretch;
  min-height: 410px;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(rgba(16, 24, 32, 0.72), rgba(16, 24, 32, 0.72)),
    url("https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1600&q=80") center / cover;
  color: #fff;
}

.hero .eyebrow {
  color: #ffd166;
}

.hero-logo {
  display: block;
  width: min(420px, 92%);
  max-height: 150px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 14px;
}

.hero h1 {
  max-width: 740px;
  margin: 18px 0 14px;
  font-size: clamp(46px, 7vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.55;
}

.hero-board,
.partner-grid,
.membership-grid,
.care-programme,
.timeline,
.concierge-grid,
.market-grid,
.provider-list,
.feed {
  display: grid;
  gap: 14px;
}

.hero-board {
  align-content: end;
}

.signal-card,
.route-card,
.module-strip article,
.market-card,
.provider-card,
.composer,
.feed-card,
.assistant-card,
.assistant-result,
.partner-grid article,
.plan-card,
.care-programme article,
.timeline-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(17, 24, 39, 0.03);
}

.signal-card,
.route-card {
  padding: 16px;
  color: var(--ink);
}

.signal-card strong {
  display: block;
  margin: 4px 0;
  font-size: 32px;
}

.route-card {
  border-left: 4px solid #f4b000;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 999px;
  background: #16a34a;
}

.module-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.module-strip article {
  padding: 18px;
}

.module-strip span {
  color: var(--gold);
  font-weight: 900;
}

.module-strip strong,
.market-card strong,
.provider-card strong,
.feed-card strong,
.partner-grid strong {
  display: block;
  margin: 8px 0;
}

.module-strip p,
.market-card p,
.provider-card p,
.feed-card p,
.partner-grid p,
.assistant-result p {
  color: var(--muted);
  line-height: 1.5;
}

.section-view {
  display: none;
}

.section-view.active {
  display: grid;
}

.content-grid {
  gap: 16px;
  margin-top: 18px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0;
}

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

.market-card,
.provider-card,
.composer,
.feed-card,
.assistant-card,
.assistant-result,
.partner-grid article,
.plan-card,
.care-programme article,
.timeline-step {
  padding: 18px;
}

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

.plan-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.plan-card strong {
  font-size: 21px;
}

.plan-card h3 {
  margin: 0;
  font-size: 38px;
  letter-spacing: 0;
}

.plan-card h3 span {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.plan-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.featured-plan {
  border-color: rgba(14, 124, 102, 0.42);
  box-shadow: var(--shadow);
}

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

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

.timeline-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: #edf3f8;
  color: var(--ink);
  font-weight: 900;
}

.timeline-step.active span {
  background: var(--green);
  color: #fff;
}

.market-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}

.card-meta,
.trust-row,
.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e7f6f1;
  color: #08735f;
  font-size: 12px;
  font-weight: 800;
}

.provider-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
}

.chip.active {
  background: #101820;
  color: #fff;
}

.community-layout,
.concierge-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  align-items: start;
}

.composer label,
.assistant-card label {
  display: grid;
  gap: 10px;
  font-weight: 800;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  transform: translateX(105%);
  transition: transform 180ms ease;
  background: #fff;
  box-shadow: var(--shadow);
  z-index: 20;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.drawer-body a {
  color: var(--blue);
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  max-width: min(520px, calc(100vw - 28px));
  transform: translate(-50%, 120px);
  padding: 14px 18px;
  border-radius: 8px;
  background: #101820;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform 180ms ease;
  z-index: 30;
}

.toast.show {
  transform: translate(-50%, 0);
}

meter {
  width: 100%;
  height: 14px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .hero,
  .community-layout,
  .concierge-grid {
    grid-template-columns: 1fr;
  }

  .module-strip,
  .market-grid,
  .partner-grid,
  .membership-grid,
  .care-programme,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main,
  .sidebar {
    padding: 16px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-list,
  .module-strip,
  .market-grid,
  .partner-grid,
  .membership-grid,
  .care-programme,
  .timeline {
    grid-template-columns: 1fr;
  }

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

  .hero h1 {
    font-size: 44px;
  }

  .provider-card {
    grid-template-columns: 1fr;
  }
}
