:root {
  --ink: #1f1711;
  --muted: #51473e;
  --line: rgba(31, 23, 17, 0.18);
  --orange: #e65f16;
  --orange-dark: #9e3608;
  --gold: #c97a14;
  --cream: #fff7ef;
  --paper: #fffaf4;
  --paper-strong: #ffffff;
  --red: #a93424;
  --focus: #0b5fff;
  --shadow: 0 22px 64px rgba(42, 25, 14, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(31, 23, 17, 0.92), rgba(62, 35, 18, 0.78)),
    url("assets/dagaz-event.jpg");
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 247, 239, 0.10), rgba(31, 23, 17, 0.72));
  background-size: 64px 64px, 64px 64px, auto;
}

button,
input {
  font: inherit;
}

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

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(180deg, #ffffff, #fff7ef);
  box-shadow: 18px 0 54px rgba(15, 10, 7, 0.28);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 0 6px 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  min-width: 132px;
  height: 48px;
  padding: 8px 10px;
  border: 1px solid rgba(243, 112, 33, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(118, 69, 28, 0.08);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 2px;
  color: rgba(33, 27, 22, 0.58);
  font-size: 13px;
}

.demo-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.mobile-stepper {
  display: none;
}

.nav-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  width: 100%;
  padding: 14px 12px;
  border: 1px solid rgba(31, 23, 17, 0.08);
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
  border-color: rgba(230, 95, 22, 0.42);
  background: linear-gradient(135deg, rgba(230, 95, 22, 0.15), rgba(201, 122, 20, 0.10));
  box-shadow: inset 3px 0 0 var(--orange), 0 10px 26px rgba(42, 25, 14, 0.10);
}

.nav-index {
  color: var(--orange);
  font-weight: 700;
}

.nav-item strong,
.nav-item small {
  display: block;
}

.nav-item small {
  margin-top: 3px;
  color: #62574e;
  line-height: 1.35;
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(230, 95, 22, 0.30);
  border-radius: 8px;
  background: rgba(243, 112, 33, 0.08);
}

.sidebar-note p {
  margin: 8px 0 0;
  color: rgba(33, 27, 22, 0.68);
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  max-width: 100%;
  padding: 32px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  color: #fff7ef;
}

.eyebrow {
  display: block;
  margin-bottom: 6px;
  color: #b9450d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.12;
  color: inherit;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-button,
.primary-action,
.small-action {
  border: 1px solid rgba(31, 23, 17, 0.18);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(30, 16, 8, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button:hover,
.primary-action:hover,
.small-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(30, 16, 8, 0.24);
}

.icon-button {
  width: 40px;
  height: 40px;
  font-size: 20px;
}

.primary-action {
  padding: 11px 16px;
  border-color: var(--orange-dark);
  color: #fff;
  background: linear-gradient(135deg, #a93a07, #e65f16);
  font-weight: 700;
}

.demo-content {
  display: grid;
  gap: 18px;
}

.hero-panel,
.panel,
.output-panel {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.50);
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 28px;
  padding: 30px;
  overflow: hidden;
}

.hero-panel p,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

.hero-panel h2 {
  max-width: 760px;
  font-size: 30px;
  line-height: 1.08;
}

.hero-panel > div:first-child {
  position: relative;
  z-index: 1;
}

.stage-visual {
  min-height: 278px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 10, 7, 0.12), rgba(158, 54, 8, 0.22)),
    url("assets/dagaz-event.jpg");
  background-position: center;
  background-size: cover;
  position: relative;
}

.stage-visual::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.stage-card {
  position: absolute;
  left: 34px;
  right: 34px;
  bottom: 32px;
  padding: 15px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(31, 23, 17, 0.86);
}

.stage-card strong,
.stage-card span {
  display: block;
}

.stage-card span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.4;
}

.audio-guide {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(158, 54, 8, 0.22);
  border-radius: 8px;
  background: #fffaf4;
}

.ai-proof {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(158, 54, 8, 0.26);
  border-left: 4px solid var(--orange);
  border-radius: 8px;
  background: #ffffff;
}

.ai-proof span {
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.ai-proof p {
  margin: 0;
  color: #352a21;
  line-height: 1.5;
}

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(31, 23, 17, 0.72);
}

.demo-modal.is-hidden {
  display: none;
}

.demo-modal-card {
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 10px;
  color: var(--ink);
  background: #fffaf4;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.36);
}

.demo-modal-card h2 {
  margin-bottom: 12px;
  font-size: 30px;
}

.demo-modal-card p {
  color: #463b31;
  line-height: 1.62;
}

.modal-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.modal-points div {
  padding: 14px;
  border: 1px solid rgba(158, 54, 8, 0.20);
  border-radius: 8px;
  background: #ffffff;
}

.modal-points strong,
.modal-points span {
  display: block;
}

.modal-points span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
}

.audio-guide strong {
  display: block;
}

.audio-guide audio {
  width: 100%;
}

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

.panel,
.output-panel {
  padding: 20px;
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #ffffff;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
audio:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
}

.upload-card,
.fact,
.insight,
.timeline-item,
.criteria-column,
.criterion,
.weight,
.metric,
.data-row,
.memory-row,
.report-preview,
.price-card,
.payment-item {
  border: 1px solid rgba(33, 27, 22, 0.11);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.upload-card {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: start;
  padding: 18px;
  border-style: dashed;
}

.upload-icon,
.timeline-item > span,
.payment-item span {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-weight: 700;
}

.upload-icon {
  width: 54px;
  height: 54px;
  font-size: 24px;
}

.fact-grid,
.insight-list,
.criteria-board,
.timeline {
  display: grid;
  gap: 12px;
}

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

.fact,
.insight,
.criteria-column,
.weight,
.metric,
.memory-row,
.report-preview,
.price-card,
.payment-item {
  padding: 14px;
}

.fact span,
.fact strong,
.insight strong,
.insight span,
.weight span,
.weight strong,
.metric strong,
.metric span,
.memory-row strong,
.memory-row span,
.price-card span,
.price-card strong,
.payment-item strong,
.payment-item small {
  display: block;
}

.fact span,
.insight span,
.weight span,
.metric span,
.memory-row span,
.payment-item small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.tag,
.status,
.chip {
  color: #1f1711;
}

.price-card strong,
.metric strong,
.fact strong {
  color: #1f1711;
}

.timeline-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px;
}

.timeline-item > span {
  width: 32px;
  height: 32px;
}

.timeline-item p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.criterion {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  margin-top: 8px;
}

.status {
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.confirmed {
  background: var(--orange);
}

.likely {
  color: #1f1606;
  background: var(--gold);
}

.unknown {
  background: #7d858a;
}

.mismatch {
  background: var(--red);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric strong {
  font-size: 24px;
}

.data-table {
  display: grid;
  gap: 8px;
}

.data-header,
.data-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.7fr 1.4fr;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 8px;
}

.data-header {
  color: var(--orange-dark);
  border: 1px solid rgba(243, 112, 33, 0.16);
  background: rgba(243, 112, 33, 0.10);
  font-weight: 700;
}

.progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(229, 219, 208, 0.9);
}

.progress span {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  transition: width 420ms ease;
}

.weight {
  margin-bottom: 10px;
}

.weight strong {
  float: right;
  margin-top: -18px;
}

.memory-row {
  display: grid;
  grid-template-columns: 1.1fr 1.6fr auto;
  gap: 12px;
  align-items: center;
}

.memory-row + .memory-row {
  margin-top: 10px;
}

.tag {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--orange-dark);
  background: rgba(243, 112, 33, 0.14);
  font-size: 12px;
  font-weight: 700;
}

.report-preview {
  display: grid;
  gap: 14px;
  margin-top: 16px;
  border-color: rgba(243, 112, 33, 0.28);
  background: rgba(243, 112, 33, 0.10);
}

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

.preview-grid > div {
  padding: 12px;
  border: 1px solid rgba(243, 112, 33, 0.14);
  border-radius: 8px;
  background: #ffffff;
}

.preview-grid strong,
.preview-grid span {
  display: block;
}

.preview-grid span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.price-card {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 18px;
  border-color: rgba(243, 112, 33, 0.30);
  background: linear-gradient(135deg, rgba(243, 112, 33, 0.13), rgba(248, 177, 61, 0.16));
}

.executive-summary,
.next-step-panel {
  border-color: rgba(243, 112, 33, 0.30);
  background: #fffaf4;
}

.executive-summary .preview-grid > div {
  min-height: 138px;
}

.price-card strong {
  color: var(--orange-dark);
  font-size: 34px;
  line-height: 1.05;
}

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

.payment-item span {
  width: 28px;
  height: 28px;
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 12px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(243, 112, 33, 0.18);
  }

  .demo-nav,
  .sidebar-note {
    display: none;
  }

  .mobile-stepper {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
    width: 100%;
  }

  .mobile-stepper select,
  .stepper-button {
    min-width: 0;
    height: 40px;
    border: 1px solid rgba(158, 54, 8, 0.34);
    border-radius: 8px;
    color: var(--ink);
    background: #ffffff;
  }

  .mobile-stepper select {
    width: 100%;
    padding: 0 10px;
  }

  .mobile-stepper option {
    color: var(--ink);
  }

  .stepper-button {
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, #9e3608, #e65f16);
    font-size: 24px;
    line-height: 1;
  }

  .workspace {
    scroll-margin-top: 142px;
    padding-top: 18px;
  }

  .topbar {
    color: #fff7ef;
  }

  .hero-panel,
  .grid-2,
  .filters,
  .metric-row,
  .criteria-board,
  .fact-grid,
  .preview-grid,
  .payment-grid {
    grid-template-columns: 1fr;
  }

  .data-header {
    display: none;
  }

  .data-row,
  .memory-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .workspace {
    padding: 14px;
    scroll-margin-top: 126px;
  }

  .brand-logo {
    width: 108px;
    min-width: 108px;
    height: 40px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: row;
    gap: 10px;
    margin-bottom: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .top-actions {
    flex-shrink: 0;
    gap: 6px;
  }

  .icon-button {
    width: 36px;
    height: 36px;
  }

  .primary-action {
    padding: 9px 11px;
    font-size: 13px;
  }

  .hero-panel,
  .panel,
  .output-panel {
    padding: 14px;
  }

  .hero-panel h2 {
    font-size: 24px;
    line-height: 1.14;
  }

  .stage-visual {
    min-height: 156px;
  }

  .stage-card {
    left: 18px;
    right: 18px;
    bottom: 18px;
  }

  .demo-modal {
    padding: 12px;
  }

  .demo-modal-card {
    padding: 20px;
  }

  .demo-modal-card h2 {
    font-size: 24px;
  }

  .modal-points {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
