/* Mountain West Aquascapes — Quote Intake (teal / water-feature vibe) */
:root {
  --royal: #0d7ea8;
  --royal-deep: #0a5f82;
  --royal-soft: #e6f4f9;
  --royal-mid: #b8dcec;
  --ink: #14242e;
  --muted: #5a6b75;
  --paper: #f4f8fa;
  --card: #ffffff;
  --border: rgba(10, 95, 130, 0.14);
  --shadow: 0 10px 30px rgba(10, 95, 130, 0.09);
  --radius: 18px;
  --radius-sm: 12px;
  --accent: var(--royal);
  --soft-1: var(--royal-soft);
  --soft-2: #d0eaf4;
  --soft-3: #9ecadb;
  --navy: var(--royal-deep);
  --white: #fff;
  --ink-muted: #4a5f6b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: #e4eef3;
  background-image:
    linear-gradient(180deg, rgba(244, 248, 250, 0.78) 0%, rgba(244, 248, 250, 0.58) 40%, rgba(228, 238, 243, 0.68) 100%),
    url("assets/stock-mist-bg.jpg");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100%;
}

.hero-header {
  position: relative;
  isolation: isolate;
  min-height: 168px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.25);
}

.hero-header-bg {
  position: absolute;
  inset: 0;
  background:
    url("assets/mw_header_aquascapes.png") center / cover no-repeat;
  transform: scale(1.02);
  z-index: 0;
}

.hero-header-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(8, 36, 52, 0.62) 0%, rgba(8, 36, 52, 0.36) 50%, rgba(8, 36, 52, 0.2) 100%),
    linear-gradient(180deg, rgba(8, 36, 52, 0.1) 0%, rgba(8, 36, 52, 0.3) 100%);
}

.hero-header-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  padding: 1.35rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hero-header .logo-wrap {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  border: none;
  background: transparent;
}

.hero-header .logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-header .header-text h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.hero-header .header-text p {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

@media (min-width: 640px) {
  .hero-header { min-height: 200px; }
}

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.25rem 1.15rem 9rem;
}

.intro {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(230, 244, 249, 0.82) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
}

.intro::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--royal), #5eb8d6);
}

.intro h2 {
  margin: 0 0 0.45rem;
  font-size: 1.28rem;
  color: var(--royal-deep);
  letter-spacing: -0.02em;
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.intro-note {
  margin-top: 0.85rem !important;
  font-size: 0.88rem !important;
}

.card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.15rem;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.05rem 1.25rem;
  background: linear-gradient(120deg, rgba(230, 244, 249, 0.88) 0%, rgba(255, 255, 255, 0.72) 55%, rgba(244, 248, 250, 0.8) 100%);
  border-bottom: 1px solid var(--border);
  color: var(--ink);
}

.card-head-text { flex: 1; min-width: 0; }

.card-head h2 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--royal-deep);
}

.card-head .section-blurb {
  margin: 0.4rem 0 0;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--muted);
  max-width: 42rem;
}

.card-head .count-badge {
  flex-shrink: 0;
  margin-top: 0.15rem;
  background: var(--royal-soft);
  border: 1px solid var(--royal-mid);
  color: var(--royal-deep);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  min-width: 1.75rem;
  text-align: center;
}

.card-body { padding: 1.15rem 1.25rem 1.35rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--royal-deep);
}

label.field input,
label.field textarea {
  appearance: none;
  border: 1.5px solid var(--soft-3);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
}

label.field input:focus,
label.field textarea:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(13, 126, 168, 0.18);
}

label.field textarea {
  min-height: 88px;
  resize: vertical;
}

label.field .req-mark {
  color: #b42318;
  font-weight: 700;
}

.question-block {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.question-block:first-child { padding-top: 0; }
.question-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.question-label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--royal-deep);
  letter-spacing: -0.01em;
}

.question-help {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--ink-muted);
  max-width: 40rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.15rem;
}

.chip-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  max-width: 100%;
}

.chip-option .option-help {
  margin: 0;
  padding-left: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--ink-muted);
  max-width: 22rem;
}

.chip {
  appearance: none;
  border: 1.5px solid var(--soft-3);
  background: rgba(255, 255, 255, 0.82);
  color: var(--royal-deep);
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
  text-align: left;
  line-height: 1.3;
  max-width: 100%;
  width: fit-content;
}

.chip:hover {
  border-color: var(--royal);
  background: var(--royal-soft);
  transform: translateY(-1px);
}

.chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 126, 168, 0.28);
}

.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--royal), var(--royal-deep));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(13, 126, 168, 0.35);
}

.chip[aria-pressed="true"]:hover {
  background: linear-gradient(135deg, #1490bc, #0c6e96);
}

.gpm-field {
  max-width: 16rem;
}

.gpm-field input {
  appearance: none;
  border: 1.5px solid var(--soft-3);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.85rem;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  width: 100%;
}

.gpm-field input:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(13, 126, 168, 0.18);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.05rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--royal-deep);
  border: 1.5px solid var(--soft-3);
}

.btn-primary {
  background: linear-gradient(135deg, var(--royal), var(--royal-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(13, 126, 168, 0.3);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-submit {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
}

.submit-block { margin-top: 0.5rem; }

.submit-status {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.2em;
}

.submit-status.ok { color: #1f7a45; }
.submit-status.err { color: #b42318; }

.submit-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.summary-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(10, 95, 130, 0.08);
}

.summary-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0.75rem 1.15rem calc(0.75rem + env(safe-area-inset-bottom));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}

.summary-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.progress-block {
  flex: 1;
  min-width: 10rem;
  max-width: 18rem;
}

.progress-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.progress-label-row .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 650;
}

.progress-pct {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--royal-deep);
}

.progress-track {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(13, 126, 168, 0.12);
  overflow: hidden;
  border: 1px solid rgba(13, 126, 168, 0.16);
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--royal), var(--royal-deep));
  transition: width 0.28s ease;
}

.band-explain {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 16rem;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1.5rem 0 0.5rem;
}

.site-footer .slogan {
  font-weight: 600;
  color: var(--royal-deep);
  margin-bottom: 0.25rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 6.5rem;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 40;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.question-block.is-incomplete .question-label::after {
  content: " · required";
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

@media print {
  .summary-bar, .toast, .no-print { display: none !important; }
  .page { padding-bottom: 1rem; }
  body { background: #fff; }
}


/* Discharges / stream arms */
.discharge-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.65rem;
}
.discharge-card {
  border: 1px solid rgba(13, 126, 168, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.72);
  padding: 0.85rem 0.9rem 0.95rem;
}
.discharge-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.discharge-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--royal-deep);
}
.discharge-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}
.discharge-remove:hover { color: #b42318; background: rgba(180,35,24,0.08); }
.arm-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.arm-row {
  display: grid;
  grid-template-columns: 1fr 7.5rem auto;
  gap: 0.45rem;
  align-items: center;
}
.arm-row label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.arm-row input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(13, 126, 168, 0.28);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
}
.arm-row input[type="number"]:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 3px rgba(13, 126, 168, 0.18);
}
.arm-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.35rem 0.4rem;
  border-radius: 6px;
}
.arm-remove:hover { color: #b42318; background: rgba(180,35,24,0.08); }
.arm-actions, .discharge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.btn-add-soft {
  border: 1px dashed rgba(13, 126, 168, 0.45);
  background: rgba(13, 126, 168, 0.06);
  color: var(--royal-deep);
  font-weight: 650;
  font-size: 0.82rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}
.btn-add-soft:hover {
  background: rgba(13, 126, 168, 0.12);
  border-color: var(--royal);
}
.discharge-subtotal, .flow-grand-total {
  margin: 0.55rem 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--royal-deep);
}
.flow-grand-total {
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(13,126,168,0.12), rgba(13,126,168,0.04));
  border: 1px solid rgba(13, 126, 168, 0.2);
  font-size: 0.95rem;
}
.flow-grand-total span {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 560px) {
  .arm-row {
    grid-template-columns: 1fr auto;
  }
  .arm-row label:first-child { grid-column: 1 / -1; }
}

.flow-explainer {
  margin: 0.35rem 0 1rem;
  padding: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(13, 126, 168, 0.2);
  background: #fff;
}
.flow-explainer img {
  display: block;
  width: 100%;
  height: auto;
}
.flow-explainer figcaption {
  margin: 0;
  padding: 0.65rem 0.85rem 0.8rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--ink);
  background: rgba(13, 126, 168, 0.06);
  border-top: 1px solid rgba(13, 126, 168, 0.12);
}
.flow-explainer figcaption strong { color: var(--royal-deep); }
.flow-explainer figcaption em { font-style: normal; font-weight: 650; color: var(--royal-deep); }
