/*
  Depth layers for the v5 visual target (landing.html / app.html).
  Requires html.lzp4. Semantic colour is in lzp-v5-tokens.css + lzp-v5.css.
  Locked §10 numbers unchanged. No rainbow doughnut.
*/

html.lzp4 {
  color-scheme: light;
}

html.lzp4 body {
  background:
    radial-gradient(1200px 480px at 8% -8%, rgba(141, 249, 168, 0.16), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(211, 228, 254, 0.55), transparent 50%),
    #f5f8ff;
  color: #0b1c30;
}

html.lzp4 .text-on-surface-variant {
  color: #3a4d63;
}

html.lzp4 .font-body.text-on-surface-variant,
html.lzp4 p.text-on-surface-variant,
html.lzp4 span.text-on-surface-variant {
  color: #2f4258;
}

html.lzp4 .text-[10px].uppercase.tracking-wider.text-on-surface-variant,
html.lzp4 .text-\[10px\].uppercase.tracking-wider.text-on-surface-variant {
  color: #3a4d63;
  letter-spacing: 0.12em;
}

/* —— Cards / panels: a real second layer —— */
html.lzp4 .lzp-card,
html.lzp4 #page-root .bg-surface-container-lowest,
html.lzp4 #main .bg-surface-container-lowest,
html.lzp4 article.bg-surface-container-lowest,
html.lzp4 form.bg-surface-container-lowest,
html.lzp4 .overlay-shadow {
  background: #ffffff;
  border: 1px solid rgba(211, 228, 254, 0.9);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 2px rgba(11, 28, 48, 0.04),
    0 10px 28px -18px rgba(33, 49, 69, 0.45);
}

html.lzp4 .lzp-hero {
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
  border-left-width: 4px;
  border-left-color: #006d35;
}

html.lzp4 .lzp-caption {
  color: #2f4258;
  font-size: 0.75rem;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
}

html.lzp4 .lzp-kicker {
  color: #3a4d63;
}

/* —— Fields: well, not a 1px floor stroke —— */
html.lzp4 .field-line {
  background: #eff4ff;
  border: 1px solid #d3e4fe;
  border-radius: 0.25rem;
  padding: 0.65rem 0.75rem;
  margin-top: 0.35rem;
  color: #0b1c30;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
html.lzp4 .field-line:hover {
  border-color: #b8cdee;
}
html.lzp4 .field-line:focus {
  outline: none;
  border: 1px solid #006d35;
  box-shadow: 0 0 0 3px rgba(141, 249, 168, 0.45);
  background: #ffffff;
}
html.lzp4 .field-line:disabled {
  background: #e5eeff;
  color: #3a4d63;
}

/* —— Tables —— */
html.lzp4 .lzp-table-wrap {
  border: 1px solid #d3e4fe;
  border-radius: 0.25rem;
  overflow: hidden;
  background: #ffffff;
}
html.lzp4 .lzp-table {
  border-collapse: separate;
  border-spacing: 0;
}
html.lzp4 .lzp-table thead {
  background: #e5eeff;
}
html.lzp4 .lzp-table thead th {
  color: #0b1c30;
  font-weight: 700;
  border-bottom: 1px solid #d3e4fe;
}
html.lzp4 .lzp-table tbody tr:nth-child(even) {
  background: #f5f8ff;
}
html.lzp4 .lzp-table tbody tr:hover {
  background: #e5eeff;
}
html.lzp4 .lzp-table tbody td {
  color: #0b1c30;
  border-bottom: 1px solid rgba(211, 228, 254, 0.7);
}
html.lzp4 .lzp-row-mark td {
  background: #8df9a8 !important;
  color: #0b1c30;
}

/* —— Charts —— */
html.lzp4 .lzp-chart {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 0.5rem;
}
html.lzp4 .lzp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 11px;
  font-weight: 600;
  color: #0b1c30;
}
html.lzp4 .lzp-legend i {
  display: inline-block;
  width: 1.15rem;
  height: 0.45rem;
  margin-right: 0.35rem;
  vertical-align: middle;
  border-radius: 1px;
}

html.lzp4 .h-32.bg-surface-dim,
html.lzp4 .h-24.bg-surface-dim,
html.lzp4 .h-56.bg-surface-dim {
  background: #eff4ff;
  border: 1px dashed #b8cdee;
}
html.lzp4 .lzp-plot {
  background: #eff4ff;
  border: 1px solid #d3e4fe;
  border-radius: 0.25rem;
  padding: 0.35rem 0.2rem 0.15rem;
  flex: 1;
  min-height: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}
html.lzp4 .lzp-plot svg {
  display: block;
  width: 100%;
  height: 100%;
}

html.lzp4 .lzp-hbar-track {
  height: 0.625rem;
  background: #e5eeff;
  border-radius: 0.125rem;
  overflow: hidden;
  margin-top: 0.35rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
html.lzp4 .lzp-hbar-fill {
  height: 100%;
  border-radius: 0.125rem;
}

html.lzp4 .lzp-meter-track {
  height: 0.7rem;
  background: #d3e4fe;
  border-radius: 0.125rem;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}
html.lzp4 .lzp-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #006d35 0%, #1ea34f 100%);
  border-radius: 0.125rem;
}

html.lzp4 .lzp-gbar {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.45rem 0.75rem;
  align-items: center;
}

/* Empty PRIMARY wells: dashed layer, not a grey slab */
html.lzp4 .bg-surface-dim.rounded-sm.p-8 {
  background: repeating-linear-gradient(
    -12deg,
    #eff4ff,
    #eff4ff 10px,
    #f8f9ff 10px,
    #f8f9ff 20px
  );
  border: 1px dashed #b8cdee;
  box-shadow: none;
}

/* Idle chips read as navy-on-blue, not grey-on-grey */
html.lzp4 .bg-surface-container-high.text-on-surface-variant {
  background: #e5eeff;
  color: #0b1c30;
}

/* Sidebar / header slight depth */
html.lzp4 #sidebar {
  box-shadow: 1px 0 0 #d3e4fe, 8px 0 24px -20px rgba(33, 49, 69, 0.4);
}
html.lzp4 #app-shell header,
html.lzp4 #site-header > div.max-w-\[1440px\] {
  border-bottom-color: #d3e4fe;
}

/* Landing estimator result: light report panel instead of a dark slab */
html.lzp4 .lzp-result {
  background: #ffffff;
  color: #0b1c30;
  border: 1px solid #d3e4fe;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 32px -20px rgba(33, 49, 69, 0.5);
}
html.lzp4 .lzp-result .lzp-kicker,
html.lzp4 .lzp-result .font-label {
  color: #3a4d63;
}
html.lzp4 .lzp-result .font-body {
  color: #2f4258;
}

/* Path-to-Zero black band: keep the metal, add a plot well on the right */
html.lzp4 .lzp-path-plot {
  background: #1c1b1b;
  border: 1px solid rgba(234, 241, 255, 0.12);
  box-shadow: 0 12px 32px -18px rgba(0, 0, 0, 0.6);
}

/* Hero demo card */
html.lzp4 .pillar-orbit--hero article.bg-surface-container-lowest,
html.lzp4 .lg\\:hidden article.bg-surface-container-lowest {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 40px -24px rgba(33, 49, 69, 0.55);
}

html.lzp4 [aria-label="Six life pillars"] .w-9 {
  border: 1px solid #d3e4fe;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
html.lzp4 #freedom li {
  border-bottom: 1px solid #d3e4fe;
}
html.lzp4 #freedom li:last-child {
  border-bottom: 0;
}

/* Command palette + drawers */
html.lzp4 #cmd-scrim > div,
html.lzp4 aside.overlay-shadow {
  border: 1px solid #d3e4fe;
}
