:root {
  --accent: #f79549;
  --secondary: #b3a098;
  --bg: #111315;
  --panel: #1a1d20;
  --line: #34383c;
  --text: #f3f1ef;
  --muted: #b5b8bc;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--bg);
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: #25292e;
  color: var(--text);
  border-radius: 9px;
  padding: 10px 15px;
  min-height: 42px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:hover,
a.button:hover {
  background: #363b40;
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #171411;
  font-weight: 700;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button.active {
  background: #3a3028;
  border-color: var(--accent);
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
input,
select,
textarea {
  border: 1px solid #4b5057;
  background: #121517;
  border-radius: 8px;
  padding: 10px;
  color: var(--text);
  width: 100%;
  min-height: 42px;
}
input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  accent-color: var(--accent);
}
textarea {
  min-height: 85px;
  resize: vertical;
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}
label.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -1px;
  margin-bottom: 9px;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 16px;
}
p {
  line-height: 1.6;
}
.muted,
small {
  color: var(--muted);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.brand {
  display: block;
  background: white;
  border-radius: 9px;
  padding: 4px;
  width: 190px;
}
.brand img {
  width: 100%;
  display: block;
}
.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
.sidebar {
  padding: 26px 19px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: #151719;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav button {
  text-align: left;
  justify-content: start;
  background: transparent;
  border-color: transparent;
  padding: 12px;
}
.sidebar nav button.active {
  background: #302820;
  color: var(--accent);
}
.sidebar footer {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
}
.workspace {
  min-width: 0;
}
.topbar {
  border-bottom: 1px solid var(--line);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.topbar select {
  max-width: 420px;
}
.topbar .tools {
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
}
main {
  padding: 30px 32px;
  max-width: 1600px;
  margin: auto;
}
.hero,
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hero {
  margin-bottom: 24px;
}
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  border: 1px solid #68503b;
  background: #30261f;
  border-radius: 30px;
  padding: 6px 11px;
  color: #ffc18d;
  font-size: 12px;
}
.badge.neutral {
  border-color: var(--line);
  background: #24282c;
  color: #cdd1d4;
}
.card {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid .card {
  margin-bottom: 0;
}
.fieldgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.stack {
  display: grid;
  gap: 14px;
}
.stat {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.8px;
}
.stat small {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}
.notice {
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  background: #2a241e;
  color: #e3d7ce;
  font-size: 13px;
  line-height: 1.6;
  margin: 16px 0;
}
.error {
  color: #ff9f99;
}
.chart-wrap {
  position: relative;
  overflow: hidden;
}
.chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 250px;
}
.chart text {
  font-family: inherit;
  fill: var(--muted);
  font-size: 12px;
}
.chart .gridline {
  stroke: var(--line);
  stroke-width: 1;
}
.chart .curve {
  fill: none;
  stroke-width: 3;
  stroke-linejoin: round;
}
.chart .point {
  cursor: pointer;
  stroke: var(--panel);
  stroke-width: 3;
}
.chart .point:focus {
  outline: none;
  stroke: white;
  stroke-width: 4;
}
.chart .comparison {
  stroke: #8a9097;
  stroke-dasharray: 6 6;
  fill: none;
  stroke-width: 2;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.tank2 .legend-dot {
  background: var(--secondary);
}
.tank-card {
  border-top: 3px solid var(--accent);
}
.tank-card.tank2 {
  border-top-color: var(--secondary);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.metric {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.metric strong {
  display: block;
  font-size: 22px;
  margin-top: 5px;
}
.metric small {
  font-size: 11px;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 500;
  background: #202428;
  white-space: nowrap;
}
td,
th {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td input,
td select {
  min-width: 90px;
}
td.number,
th.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.risk-list {
  padding-left: 20px;
  line-height: 1.7;
  color: #d7c4b4;
  font-size: 13px;
}
.risk-list li {
  margin-bottom: 7px;
}
.diagram {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 18px;
  border: 1px dashed #655447;
  border-radius: 12px;
}
.node {
  display: grid;
  text-align: left;
  justify-content: stretch;
  min-height: 105px;
  padding: 18px;
}
.node strong {
  font-size: 16px;
}
.node small {
  line-height: 1.5;
}
.node.tank {
  border-color: var(--accent);
  border-radius: 18px 18px 40px 40px;
}
.flow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.flow .node {
  flex: 1;
  min-width: 170px;
  min-height: 78px;
}
.arrow {
  color: var(--accent);
  font-size: 24px;
}
.detail {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}
.login {
  max-width: 450px;
  margin: 10vh auto;
  padding: 30px;
}
.login .brand {
  width: 240px;
  margin-bottom: 35px;
}
.login h1 {
  font-size: 30px;
}
.loading {
  text-align: center;
  margin: 25vh 20px;
}
#toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(500px, 90vw);
  padding: 0;
  border-radius: 12px;
  background: #f3e4d6;
  color: #251b13;
  box-shadow: 0 8px 40px #0006;
}
#toast:not(:empty) {
  padding: 18px 24px;
}
.skip {
  position: absolute;
  left: 10px;
  top: -100px;
  z-index: 10;
  padding: 10px;
  background: #111;
}
.skip:focus {
  top: 10px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #101315;
  padding: 16px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
}
.price-total {
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -1px;
}
.tabheading {
  margin-bottom: 25px;
}
.empty {
  padding: 40px;
  text-align: center;
}
.customer main {
  max-width: 1120px;
}
.customer .topbar {
  max-width: 1120px;
  margin: auto;
}
.customer .card {
  break-inside: avoid;
}
details > summary {
  cursor: pointer;
  padding: 12px 0;
  color: var(--accent);
}
.dirty {
  color: var(--accent);
}
.note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
@media (min-width: 1450px) {
  main {
    padding: 36px 48px;
  }
  .chart {
    max-height: 420px;
  }
}
@media (max-width: 1000px) {
  .shell {
    grid-template-columns: 190px 1fr;
  }
  .sidebar {
    padding: 20px 12px;
  }
  .brand {
    width: 165px;
  }
  .fieldgrid,
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  main {
    padding: 24px 20px;
  }
  .topbar {
    padding: 15px 20px;
  }
  .grid.three {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .shell {
    display: block;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    gap: 14px;
  }
  .sidebar .brand {
    width: 155px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
    gap: 4px;
  }
  .sidebar nav button {
    white-space: nowrap;
    padding: 8px 12px;
  }
  .sidebar footer {
    display: none;
  }
  .topbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .topbar select {
    max-width: none;
    flex: 1;
    min-width: 180px;
  }
  .topbar .tools {
    gap: 5px;
  }
  .topbar button {
    padding: 8px 10px;
  }
  main {
    padding: 24px 16px;
  }
  .card {
    padding: 18px;
  }
  .grid,
  .fieldgrid,
  .grid.four {
    grid-template-columns: 1fr;
  }
  .grid.three {
    gap: 12px;
  }
  .hero {
    gap: 12px;
  }
  .chart {
    min-height: 210px;
  }
  .diagram {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
  }
  .node {
    padding: 12px;
    min-height: 100px;
  }
  .login {
    margin: 5vh 12px;
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat {
    font-size: 26px;
  }
}
.simple-customer main {
  max-width: 820px;
  margin-inline: auto;
}
.simple-customer .topbar .brand {
  width: 190px;
}
.customer-context {
  font-size: 14px;
  color: var(--muted);
}
.intake-wizard {
  padding: clamp(20px, 4vw, 40px);
}
.intake-wizard h1 {
  font-size: clamp(25px, 4vw, 32px);
  margin-block: 24px 12px;
}
.wizard-intro {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}
.wizard-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.intake-wizard progress {
  width: 100%;
  height: 6px;
  margin-top: 12px;
  accent-color: var(--accent);
}
.wizard-welcome,
.photo-guide,
.wizard-summary {
  padding: 20px;
  border-radius: 12px;
  background: #24282b;
  margin-block: 24px;
}
.wizard-welcome p:last-child,
.photo-guide p:last-child {
  margin-bottom: 0;
}
.wizard-field {
  margin: 28px 0;
  border: 0;
  padding: 0;
  min-width: 0;
}
.wizard-field > label,
.wizard-field legend {
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 8px;
}
.wizard-field input,
.wizard-field textarea {
  font-size: 17px;
  min-height: 48px;
}
.wizard-field .field-help,
.field-help {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 10px;
}
.wizard-field .unknown {
  padding: 6px 0;
  min-height: 44px;
  background: transparent;
  border: 0;
  font-size: 14px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.answer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.answer-buttons button {
  min-height: 48px;
  text-align: left;
}
.answer-buttons button[aria-pressed="true"] {
  border-color: var(--accent);
  background: #3a3028;
  color: var(--accent);
}
.wizard-extra {
  border-block: 1px solid var(--line);
  padding-block: 15px;
  margin-block: 24px;
}
.wizard-extra summary {
  font-size: 15px;
  color: var(--muted);
}
.wizard-metrics {
  display: grid;
  gap: 16px;
  margin-block: 16px;
}
.wizard-metrics label {
  font-size: 16px;
  min-height: 44px;
}
.wizard-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.wizard-navigation button {
  min-height: 52px;
}
.wizard-pause {
  margin-top: 24px;
  text-align: center;
}
.wizard-pause button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
}
.wizard-pause p {
  font-size: 13px;
  color: var(--muted);
}
.photo-guide li {
  margin-bottom: 12px;
}
.photo-actions {
  display: grid;
  gap: 12px;
  margin-block: 20px;
}
.photo-actions .button {
  position: relative;
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
.photo-actions .button:focus-within {
  outline: 3px solid var(--accent);
}
.photo-actions input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
#intake-documents a {
  overflow-wrap: anywhere;
}
.customer-offer {
  margin-top: 28px;
}
.customer-offer > summary {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.wizard-complete {
  text-align: center;
  padding-block: 48px;
}
@media (max-width: 480px) {
  .simple-customer .topbar .tools {
    flex-wrap: wrap;
  }
  .simple-customer .topbar select {
    min-width: 0;
    width: 100%;
  }
  .wizard-navigation {
    flex-wrap: wrap;
  }
  .wizard-navigation .primary {
    flex: 1;
  }
  .wizard-progress {
    font-size: 12px;
  }
}
@media print {
  body {
    background: white;
    color: black;
    color-scheme: light;
  }
  .sidebar,
  .topbar,
  .tools,
  button,
  .skip,
  #toast,
  .no-print {
    display: none !important;
  }
  .shell {
    display: block;
  }
  main {
    padding: 0;
    max-width: 100%;
  }
  .card {
    background: white;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
  .muted,
  small,
  label {
    color: #555;
  }
  .notice {
    background: #f5eee8;
    color: black;
  }
  .badge {
    color: black;
    background: white;
  }
  th {
    background: #eee;
    color: black;
  }
  td,
  th {
    border-color: #ddd;
  }
  h1,
  h2,
  h3,
  p,
  .stat {
    color: black;
  }
  .chart text {
    fill: #333;
  }
  .chart .gridline {
    stroke: #ddd;
  }
  .grid {
    display: block;
  }
  .grid .card {
    margin-bottom: 15px;
  }
  a {
    color: black;
  }
}
