:root {
  color-scheme: light;
  --ink: #071713;
  --pine: #063f32;
  --green: #08704f;
  --gold: #e8bd68;
  --paper: #fbfaf6;
  --line: #dbe5dd;
  --text: #10231e;
  --muted: #60726c;
  --danger: #b94739;
  --shadow: 0 20px 60px rgba(7, 23, 19, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(232, 189, 104, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 189, 104, 0.05) 1px, transparent 1px),
    var(--paper);
  background-size: 42px 42px;
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(232, 189, 104, 0.55);
  outline-offset: 2px;
}

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

[data-lucide] {
  width: 1.1rem;
  height: 1.1rem;
  stroke-width: 2.15;
}

.app-shell {
  display: grid;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 23, 19, 0.96);
  color: #fff;
  padding: 0.75rem;
  backdrop-filter: blur(18px);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 1px solid rgba(232, 189, 104, 0.72);
  border-radius: 8px;
  background: rgba(232, 189, 104, 0.12);
  color: var(--gold);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1;
}

.brand strong {
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
}

.brand small {
  margin-top: 0.35rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.nav-list {
  display: flex;
  gap: 0.45rem;
}

.nav-item,
.primary-btn,
.ghost-btn,
.sidebar-cta {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 8px;
  border: 0;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.nav-item {
  background: transparent;
  color: rgba(255, 255, 255, 0.66);
  padding: 0 0.8rem;
}

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

.nav-item.active {
  box-shadow: inset 0 -3px 0 var(--gold);
}

.sidebar-card {
  display: none;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 4.3rem;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-bottom: 1px solid rgba(219, 229, 221, 0.9);
  background: rgba(251, 250, 246, 0.9);
  padding: 1rem;
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar h1,
.section-head h2,
.hero h2 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(1.4rem, 3.5vw, 2.35rem);
  line-height: 1.05;
}

.topbar-actions,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.primary-btn {
  background: var(--green);
  color: #fff;
  padding: 0 1rem;
  box-shadow: 0 12px 30px rgba(8, 112, 79, 0.22);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0 1rem;
}

.primary-btn:hover,
.ghost-btn:hover,
.sidebar-cta:hover,
.nav-item:hover,
.publish-card:hover,
.case-item:hover,
.work-row:hover {
  transform: translateY(-1px);
}

.view {
  display: none;
  padding: 1rem;
  animation: view-in 220ms ease-out;
}

.view.active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero {
  display: grid;
  gap: 1rem;
}

.hero-media,
.hero-content,
.flyer-preview,
.story-band article,
.simple-compare article,
.metric,
.work-panel,
.chart-panel,
.case-list,
.case-detail,
.document-stack,
.ai-console,
.calendar-card,
.money-card,
.invoice-list,
.portal-screen,
.client-phone,
.automation-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(7, 23, 19, 0.08);
}

.hero-media {
  position: relative;
  min-height: 20rem;
  overflow: hidden;
  background: var(--ink);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 20rem;
  object-fit: cover;
}

.hero-media::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, rgba(7, 23, 19, 0.08), rgba(7, 23, 19, 0.72));
}

.hero-overlay {
  position: absolute;
  inset-inline: 1rem;
  bottom: 1rem;
  z-index: 1;
  display: grid;
  gap: 0.6rem;
}

.hero-overlay span {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(7, 23, 19, 0.68);
  color: #fff;
  padding: 0 0.8rem;
  font-weight: 850;
  backdrop-filter: blur(12px);
}

.hero-content {
  order: -1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.35rem;
  padding: clamp(1.25rem, 4vw, 2.4rem);
  background: linear-gradient(135deg, rgba(8, 112, 79, 0.09), transparent 52%), #fff;
}

.pill,
.case-status {
  display: inline-flex;
  width: max-content;
  min-height: 2.25rem;
  align-items: center;
  border-radius: 8px;
  background: var(--pine);
  color: #fff;
  padding: 0 0.8rem;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.pill.soft {
  background: #eef8f3;
  color: var(--green);
}

.hero h2 {
  max-width: 46rem;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  font-weight: 950;
  line-height: 0.93;
  text-wrap: balance;
}

.hero-content p {
  max-width: 44rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.impact-grid,
.metrics-grid,
.story-band,
.simple-compare,
.dashboard-grid,
.case-layout,
.ai-layout,
.agenda-layout,
.payments-grid,
.portal-layout,
.automation-grid,
.publish-grid {
  display: grid;
  gap: 1rem;
}

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

.impact-grid div {
  border-left: 3px solid var(--gold);
  padding-left: 0.75rem;
}

.impact-grid strong {
  display: block;
  font-size: 1.65rem;
  line-height: 1;
}

.impact-grid span {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.flyer-preview {
  overflow: hidden;
  padding: 0.85rem;
}

.preview-head,
.panel-title,
.section-head,
.case-heading,
.client-header,
.invoice-row,
.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.preview-head {
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
}

.preview-head span,
.mini-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.preview-head strong {
  color: var(--green);
}

.flyer-preview img {
  display: block;
  width: 100%;
  max-height: 34rem;
  object-fit: contain;
  border-radius: 8px;
  background: var(--ink);
}

.story-band {
  margin-top: 1rem;
}

.story-band article,
.simple-compare article,
.automation-grid article {
  padding: 1.2rem;
}

.story-band i,
.simple-compare i,
.automation-grid i {
  color: var(--gold);
}

.story-band h3,
.simple-compare h3,
.automation-grid h3 {
  margin: 0.75rem 0 0.45rem;
  font-size: 1.1rem;
}

.story-band p,
.simple-compare p,
.automation-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.simple-compare {
  margin-top: 1rem;
}

.simple-compare article {
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.compare-title,
.simple-compare li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.compare-title h3 {
  margin: 0;
}

.simple-compare ul {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0.1rem 0 0;
  padding: 0;
}

.simple-compare li {
  color: var(--text);
  font-weight: 850;
  line-height: 1.35;
}

.simple-compare li i {
  flex: 0 0 auto;
  color: var(--green);
}

.section-head {
  align-items: end;
  margin-bottom: 1rem;
}

.section-head h2 {
  max-width: 58rem;
  font-size: clamp(1.75rem, 4vw, 3.4rem);
  font-weight: 950;
  line-height: 1;
  text-wrap: balance;
}

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

.metric {
  padding: 1.1rem;
}

.metric span {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border-radius: 8px;
  background: #eef8f3;
  color: var(--green);
}

.metric strong {
  display: block;
  margin-top: 1rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.metric p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-weight: 800;
}

.dashboard-grid {
  margin-top: 1rem;
}

.work-panel,
.chart-panel,
.case-detail,
.ai-console,
.calendar-card,
.invoice-list,
.portal-screen,
.client-phone {
  padding: 1rem;
}

.panel-title {
  margin-bottom: 1rem;
}

.panel-title h3 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-title span,
.event-row span,
.invoice-row span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.work-row {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.9rem;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}

.work-row + .work-row {
  margin-top: 0.65rem;
}

.work-row:hover {
  border-color: rgba(8, 112, 79, 0.45);
}

.work-row strong,
.case-item strong,
.doc-card strong {
  display: block;
}

.work-row small,
.case-item span,
.doc-card span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 99px;
}

.status-dot.gold {
  background: var(--gold);
}

.status-dot.green {
  background: var(--green);
}

.status-dot.red {
  background: var(--danger);
}

.bar-chart {
  display: grid;
  min-height: 15rem;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.55rem;
  align-items: end;
  border-radius: 8px;
  background: linear-gradient(180deg, #f4f7f5, #fff);
  padding: 1rem;
}

.bar-chart span {
  height: var(--h);
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, var(--gold), var(--green));
}

.mini-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
  color: var(--muted);
  font-weight: 800;
}

.case-layout,
.ai-layout,
.agenda-layout,
.payments-grid,
.portal-layout {
  grid-template-columns: 1fr;
}

.case-list,
.document-stack {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
}

.case-item,
.publish-card,
.doc-card,
.prompt-chips button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.case-item {
  padding: 0.9rem;
  text-align: left;
}

.case-item.active {
  border-color: rgba(232, 189, 104, 0.75);
  background: #fff8e8;
}

.case-heading {
  align-items: flex-start;
  margin-bottom: 1rem;
}

.case-heading h3 {
  margin: 0.65rem 0 0.3rem;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1;
}

.case-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

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

.publish-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem;
  text-align: left;
}

.publish-card i,
.doc-card i,
.ai-answer i {
  color: var(--green);
}

.publish-card span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.publish-card.active {
  border-color: rgba(8, 112, 79, 0.45);
  background: #effaf5;
}

.publish-card.active span {
  color: var(--green);
}

.timeline {
  margin-top: 1rem;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
}

.timeline div {
  position: relative;
}

.timeline div + div {
  margin-top: 1rem;
}

.timeline span {
  position: absolute;
  left: -1.42rem;
  top: 0.25rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 99px;
  background: var(--gold);
}

.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.doc-card {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem;
}

.doc-card.active {
  border-color: rgba(8, 112, 79, 0.45);
  background: #effaf5;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.prompt-chips button {
  min-height: 2.25rem;
  color: var(--text);
  padding: 0 0.75rem;
  font-weight: 850;
}

.ai-form {
  display: grid;
  gap: 0.6rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0.75rem;
}

.ai-form input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
}

.ai-answer {
  display: flex;
  gap: 0.8rem;
  margin-top: 1rem;
  border: 1px solid rgba(8, 112, 79, 0.3);
  border-radius: 8px;
  background: #effaf5;
  padding: 1rem;
}

.ai-answer i {
  flex: 0 0 auto;
}

.ai-answer strong {
  display: block;
}

.ai-answer p {
  margin: 0.45rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.calendar-grid strong {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  text-transform: uppercase;
}

.calendar-grid button {
  min-height: 8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 950;
}

.calendar-grid button span {
  display: block;
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.calendar-grid .busy {
  border-color: rgba(8, 112, 79, 0.45);
  background: #effaf5;
  color: var(--green);
}

.event-row {
  min-height: 4.5rem;
  border-bottom: 1px solid var(--line);
}

.event-row:last-child,
.invoice-row:last-child {
  border-bottom: 0;
}

.money-card {
  min-height: 11rem;
  padding: 1.15rem;
}

.money-card span {
  color: var(--muted);
  font-weight: 850;
}

.money-card strong {
  display: block;
  margin: 1.1rem 0 0.45rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.money-card p {
  margin: 0;
  font-weight: 850;
}

.money-card.collected {
  background: #effaf5;
}

.money-card.pending {
  background: #fff6e4;
}

.invoice-row {
  min-height: 5rem;
  border-bottom: 1px solid var(--line);
}

.invoice-row button {
  min-height: 2.35rem;
  border: 0;
  border-radius: 8px;
  background: var(--pine);
  color: #fff;
  padding: 0 0.8rem;
  font-weight: 950;
}

.portal-screen {
  background: linear-gradient(135deg, rgba(8, 112, 79, 0.08), transparent 55%), #fff;
}

.avatar {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: 8px;
  background: var(--pine);
  color: #fff;
  font-weight: 950;
}

.client-header {
  justify-content: flex-start;
}

.client-header strong {
  display: block;
}

.client-header p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.portal-status {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
}

.portal-status span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.portal-status strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1.6rem;
}

.portal-status p {
  margin: 0.4rem 0 0;
  color: var(--muted);
}

.portal-items {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.portal-items div {
  display: flex;
  min-height: 3.25rem;
  align-items: center;
  gap: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 0.85rem;
  font-weight: 850;
}

.client-phone {
  background: var(--ink);
  color: #fff;
}

.phone-top {
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 0.75rem;
  font-weight: 950;
}

.chat-bubble {
  width: fit-content;
  max-width: 92%;
  border-radius: 8px;
  padding: 0.8rem;
  line-height: 1.45;
}

.chat-bubble + .chat-bubble {
  margin-top: 0.65rem;
}

.chat-bubble.client {
  background: rgba(255, 255, 255, 0.12);
}

.chat-bubble.firm {
  margin-left: auto;
  background: #dff8e9;
  color: var(--text);
}

.client-phone .primary-btn {
  margin-top: 1rem;
  width: 100%;
}

.automation-grid article span {
  display: inline-flex;
  margin-top: 1rem;
  min-height: 2rem;
  align-items: center;
  border-radius: 8px;
  background: #effaf5;
  color: var(--green);
  padding: 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: min(24rem, calc(100vw - 2rem));
  border: 1px solid rgba(232, 189, 104, 0.55);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow);
  font-weight: 850;
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 760px) {
  .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
  }

  .view {
    padding: 1.5rem;
  }

  .story-band,
  .simple-compare,
  .automation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .dashboard-grid,
  .agenda-layout,
  .portal-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  }

  .payments-grid {
    grid-template-columns: 0.7fr 0.7fr 1.4fr;
  }

  .ai-form {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

@media (min-width: 1080px) {
  .app-shell {
    grid-template-columns: 18rem minmax(0, 1fr);
  }

  .sidebar {
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    padding: 1rem;
  }

  .nav-list {
    display: grid;
  }

  .nav-item {
    justify-content: flex-start;
  }

  .nav-item.active {
    box-shadow: inset 3px 0 0 var(--gold);
  }

  .sidebar-card {
    display: block;
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    padding: 1rem;
  }

  .sidebar-card p {
    margin: 0 0 0.35rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
  }

  .sidebar-card strong {
    display: block;
    margin-bottom: 0.85rem;
  }

  .sidebar-cta {
    width: 100%;
    background: var(--green);
    color: #fff;
  }

  .topbar {
    top: 0;
  }

  .view {
    padding: 1.6rem;
  }

  .hero {
    grid-template-columns: minmax(17rem, 0.72fr) minmax(0, 1.15fr) minmax(16rem, 0.55fr);
  }

  .hero-content {
    order: 0;
    min-height: 28rem;
  }

  .hero-media,
  .hero-media img {
    min-height: 28rem;
  }

  .case-layout,
  .ai-layout {
    grid-template-columns: 18rem minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .section-head,
  .case-heading,
  .preview-head,
  .invoice-row,
  .event-row {
    align-items: stretch;
    flex-direction: column;
  }

  .publish-grid,
  .impact-grid,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 2.45rem;
  }
}
