:root {
  --hypko-navy: #102746;
  --hypko-navy-2: #173a66;
  --hypko-blue: #2368a2;
  --hypko-gold: #f2b705;
  --hypko-gold-soft: #fff7d8;
  --hypko-green: #17845b;
  --hypko-red: #c84a42;
  --hypko-ink: #172033;
  --hypko-muted: #677287;
  --hypko-line: #dce3ec;
  --hypko-surface: #ffffff;
  --hypko-canvas: #f4f7fb;
  --hypko-radius: 18px;
  --hypko-shadow: 0 18px 50px rgba(16, 39, 70, .10);
  --hypko-shadow-soft: 0 7px 24px rgba(16, 39, 70, .07);
}

html { scroll-behavior: smooth; }

body.hypko-app {
  margin: 0;
  color: var(--hypko-ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(242, 183, 5, .12), transparent 28rem),
    radial-gradient(circle at 95% 10%, rgba(35, 104, 162, .10), transparent 30rem),
    var(--hypko-canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

body.hypko-app *, body.hypko-app *::before, body.hypko-app *::after { box-sizing: border-box; }
body.hypko-app button, body.hypko-app input, body.hypko-app select { font: inherit; }
body.hypko-app button { cursor: pointer; }

body.hypko-app button:focus-visible,
body.hypko-app input:focus-visible,
body.hypko-app select:focus-visible,
body.hypko-app summary:focus-visible,
body.hypko-app a:focus-visible {
  outline: 3px solid rgba(35, 104, 162, .25);
  outline-offset: 2px;
}

/* Brand header */
body.hypko-app .brand-strip {
  position: sticky;
  top: 0;
  z-index: 80;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--hypko-ink) !important;
  background: rgba(255, 255, 255, .94) !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(220, 227, 236, .9) !important;
  backdrop-filter: blur(16px);
}

body.hypko-app .brand-strip .container {
  width: 100%;
  max-width: 1180px !important;
  min-height: 72px;
  margin: auto;
  padding: 10px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
}

body.hypko-app .brand-strip .brand-logo {
  display: block;
  width: 188px !important;
  min-width: 0 !important;
  height: auto !important;
  max-height: 50px;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: contain;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

body.hypko-app .brand-text {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  color: var(--hypko-navy) !important;
  background: var(--hypko-gold-soft);
  border: 1px solid #f4dc7a;
  border-radius: 999px;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body.hypko-app .brand-text::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hypko-gold);
}

/* Product hero */
body.hypko-app .hero {
  position: relative;
  overflow: hidden;
  width: calc(100% - 44px);
  max-width: 1136px;
  min-height: 305px;
  margin: 28px auto 0 !important;
  padding: 0 !important;
  color: #fff !important;
  text-align: left !important;
  background: linear-gradient(130deg, #0d223d 0%, #143a67 62%, #1f5c8f 100%) !important;
  border-radius: 28px;
  box-shadow: var(--hypko-shadow);
}

body.hypko-app .hero::after {
  content: "";
  position: absolute;
  width: 330px;
  height: 330px;
  top: -150px;
  right: -90px;
  border: 55px solid rgba(255, 255, 255, .045);
  border-radius: 50%;
}

body.hypko-app .hero .container {
  width: 100%;
  max-width: none !important;
  padding: 0 !important;
}

body.hypko-app .hero-box {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 28px;
  min-height: 305px;
  padding: 42px !important;
  color: #fff;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ui-eyebrow {
  margin: 0 0 10px;
  color: #f9cf43;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

body.hypko-app .hero h1 {
  max-width: 760px;
  margin: 0;
  color: #fff !important;
  font-size: clamp(34px, 5vw, 58px) !important;
  font-weight: 850 !important;
  line-height: 1.02 !important;
  letter-spacing: -.045em;
}

.ui-hero-copy {
  max-width: 680px;
  margin: 18px 0 0;
  color: #d6e1ef;
  font-size: 17px;
}

.ui-benefits { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 26px; }
.ui-benefit { display: flex; align-items: center; gap: 8px; color: #edf4fb; font-size: 13px; font-weight: 700; }
.ui-benefit i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--hypko-navy); background: var(--hypko-gold); font-style: normal; font-size: 12px; }

.ui-hero-metric {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 22px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(7px);
}
.ui-hero-metric small { color: #c9d8ea; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; }
.ui-hero-metric strong { color: #fff; font-size: 42px; line-height: 1; letter-spacing: -.04em; }
.ui-hero-metric span { color: #d5e1ef; font-size: 13px; }
.ui-metric-line { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .13); overflow: hidden; }
.ui-metric-line b { display: block; width: 76%; height: 100%; border-radius: inherit; background: var(--hypko-gold); }

.ui-hero-details {
  grid-column: 1 / -1;
  margin-top: -6px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: #d5e1ef;
  font-size: 12px;
}
.ui-hero-details summary { padding-top: 14px; color: #fff; cursor: pointer; font-weight: 750; }
.ui-hero-details p { max-width: 930px; margin: 10px 0 0; color: #cbd8e7; line-height: 1.65; }

/* Guided calculator shell */
.ui-workspace {
  width: calc(100% - 44px);
  max-width: 1136px;
  margin: 24px auto 130px;
  overflow: hidden;
  background: var(--hypko-surface);
  border: 1px solid var(--hypko-line);
  border-radius: 24px;
  box-shadow: var(--hypko-shadow-soft);
}

.ui-stepper-wrap { padding: 22px 24px 18px; border-bottom: 1px solid var(--hypko-line); background: linear-gradient(#fff, #fbfcfe); }
.ui-mobile-progress { display: none; color: var(--hypko-muted); font-size: 13px; font-weight: 750; margin-bottom: 10px; }
.ui-mobile-progress strong { color: var(--hypko-navy); }
.ui-mobile-line { display: none; height: 6px; border-radius: 99px; background: #e9eef4; overflow: hidden; }
.ui-mobile-line span { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hypko-gold), #ffd45b); transition: width .25s ease; }

.ui-stepper { display: grid; grid-template-columns: repeat(5, 1fr); }
.ui-step-button { position: relative; border: 0; background: transparent; padding: 0; color: var(--hypko-muted); text-align: left; }
.ui-step-button:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: 42px; right: 10px; height: 2px; background: #dfe5ed; }
.ui-step-button.done:not(:last-child)::after { background: var(--hypko-green); }
.ui-step-dot { position: relative; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 8px; border: 2px solid #cfd8e4; border-radius: 50%; color: #79869a; background: #fff; font-size: 13px; font-weight: 900; }
.ui-step-button.active { color: var(--hypko-navy); }
.ui-step-button.active .ui-step-dot { color: var(--hypko-navy); border-color: var(--hypko-gold); background: var(--hypko-gold); box-shadow: 0 0 0 5px var(--hypko-gold-soft); }
.ui-step-button.done .ui-step-dot { color: #fff; border-color: var(--hypko-green); background: var(--hypko-green); }
.ui-step-title { display: block; font-weight: 850; font-size: 13px; }
.ui-step-caption { display: block; margin-top: 2px; font-size: 11px; }

body.hypko-app form#materialForm.ui-calculator-form {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.ui-step-panel { display: none; padding: 34px; animation: uiFade .22s ease; }
.ui-step-panel.active { display: block; }
@keyframes uiFade { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

.ui-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.ui-panel-heading h2 { margin: 0 0 6px; color: var(--hypko-navy); font-size: 25px; font-weight: 800; letter-spacing: -.025em; }
.ui-panel-heading p { margin: 0; max-width: 690px; color: var(--hypko-muted); }
.ui-step-tag { display: inline-block; margin-bottom: 8px; padding: 7px 10px; border-radius: 9px; color: var(--hypko-blue); background: #ebf4fb; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }

/* Hide old headings after the UI layer labels the sections */
.ui-step-panel > #brickSizeHeading,
.ui-step-panel #rawMaterialsHeading,
.ui-step-panel #ratioTypeHeading,
.ui-step-panel #bricksPerHourHeading { display: none !important; }

/* Brick selection */
body.hypko-app .brick-size-options {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px !important;
  width: 100%;
  margin: 0 !important;
}

body.hypko-app .brick-size-options .brick-option.ui-brick-card {
  position: relative;
  display: block;
  width: auto !important;
  min-width: 0;
  height: auto !important;
  margin: 0 !important;
  padding: 10px;
  overflow: hidden;
  color: var(--hypko-ink);
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--hypko-line) !important;
  border-radius: 17px;
  transform: none !important;
  transition: .2s ease;
}

body.hypko-app .brick-size-options .brick-option.ui-brick-card:hover { transform: translateY(-2px) !important; border-color: #aebdd0 !important; box-shadow: var(--hypko-shadow-soft); }
body.hypko-app .brick-size-options .brick-option.ui-brick-card.selected { border-color: var(--hypko-blue) !important; box-shadow: 0 0 0 3px rgba(35, 104, 162, .11); background: #f9fcff; }

.ui-brick-media { position: relative; display: block; overflow: hidden; aspect-ratio: 1 / 1; border-radius: 12px; background: #eef3f8; }
.ui-brick-media::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(16, 39, 70, .08), inset 0 -28px 44px rgba(16, 39, 70, .04); }
.ui-brick-image { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.02); transition: transform .25s ease, filter .25s ease; }
.ui-brick-card:hover .ui-brick-image { transform: scale(1.025); filter: saturate(1) contrast(1.04); }
.ui-brick-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 5px 3px; }
.ui-brick-label strong { color: var(--hypko-navy); font-size: 13px; }
.ui-brick-label small { color: var(--hypko-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ui-check-badge { position: absolute; z-index: 3; top: 18px; right: 18px; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #cad4df; border-radius: 50%; color: transparent; background: #fff; box-shadow: 0 3px 9px rgba(16, 39, 70, .12); }
.ui-brick-card.selected .ui-check-badge { color: #fff; border-color: var(--hypko-green); background: var(--hypko-green); }

.ui-dimension-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; padding: 19px; border: 1px solid #cfe0ee; border-radius: 16px; background: #f7fbff; }
.ui-dimension-grid .form-group { margin: 0 !important; }

body.hypko-app label { color: #344258; font-size: 13px; font-weight: 750; }
body.hypko-app .form-control {
  width: 100%;
  min-height: 48px;
  margin: 7px 0 0 !important;
  padding: 11px 13px;
  color: var(--hypko-ink);
  background: #fff;
  border: 1px solid #ccd6e2;
  border-radius: 12px;
  box-shadow: none;
  transition: border-color .18s, box-shadow .18s;
}
body.hypko-app .form-control:focus { border-color: var(--hypko-blue); box-shadow: 0 0 0 3px rgba(35, 104, 162, .1); outline: none; }

/* Material cards */
body.hypko-app .raw-materials-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 13px !important;
  width: 100% !important;
  margin: 0 0 22px !important;
}

body.hypko-app .checkbox-container.ui-material-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 74px;
  padding: 14px;
  background: #fff;
  border: 1.5px solid var(--hypko-line);
  border-radius: 15px;
  cursor: pointer;
  transition: .18s ease;
}
body.hypko-app .checkbox-container.ui-material-card:hover { border-color: #aab9cb; }
body.hypko-app .checkbox-container.ui-material-card.checked { border-color: var(--hypko-blue); background: #f6fbff; box-shadow: 0 0 0 2px rgba(35, 104, 162, .08); }
body.hypko-app .ui-material-card input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.ui-material-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 12px; color: var(--hypko-navy); background: #edf2f7; font-weight: 900; }
.ui-material-card.checked .ui-material-icon { color: #fff; background: var(--hypko-blue); }
body.hypko-app .ui-material-card label { flex: 1; margin: 0; color: var(--hypko-navy); font-size: 14px; font-weight: 850; cursor: pointer; }
.ui-material-tick { display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid #cbd5df; border-radius: 6px; color: transparent; font-size: 12px; }
.ui-material-card.checked .ui-material-tick { color: #fff; border-color: var(--hypko-green); background: var(--hypko-green); }

.ui-ratio-card { margin-top: 22px; padding: 20px; border: 1px solid var(--hypko-line); border-radius: 17px; background: #f7f9fc; }
.ui-ratio-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.ui-ratio-top h3 { margin: 0; color: var(--hypko-navy); font-size: 16px; font-weight: 800; }
.ui-segmented { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 11px; background: #e6ebf2; }
.ui-ratio-choice { min-width: 95px; border: 0; border-radius: 8px; padding: 8px 17px; color: var(--hypko-muted); background: transparent; font-size: 12px; font-weight: 850; }
.ui-ratio-choice.active { color: var(--hypko-navy); background: #fff; box-shadow: 0 2px 8px rgba(16, 39, 70, .1); }
.ui-native-ratio { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 1px !important; padding: 0 !important; opacity: .01; pointer-events: none; }

body.hypko-app #ratioInputs {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hypko-line);
}
body.hypko-app #ratioInputs[style*="block"] { display: grid !important; }
body.hypko-app #ratioInputs > div { position: relative; }

.ui-ratio-total { display: none; justify-content: space-between; align-items: center; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--hypko-line); color: var(--hypko-muted); font-size: 13px; }
.ui-ratio-card.custom-active .ui-ratio-total { display: flex; }
.ui-ratio-status { color: var(--hypko-green); font-weight: 850; }

/* Production */
.ui-production-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; }
.ui-production-input, .ui-production-preview { padding: 24px; border: 1px solid var(--hypko-line); border-radius: 18px; }
.ui-production-input h3, .ui-production-preview h3 { margin: 0 0 6px; color: var(--hypko-navy); font-size: 18px; font-weight: 800; }
.ui-production-input p, .ui-production-preview p { margin: 0 0 18px; color: var(--hypko-muted); font-size: 13px; }
.ui-production-input .form-group { margin: 0; }
body.hypko-app #bricksPerHour { min-height: 62px; font-size: 25px; font-weight: 850; }
.ui-assumption { display: flex; gap: 8px; margin-top: 15px; color: var(--hypko-muted); font-size: 12px; }
.ui-assumption b { color: var(--hypko-blue); }
.ui-production-preview { color: #fff; border: 0; background: linear-gradient(140deg, var(--hypko-navy), var(--hypko-navy-2)); }
.ui-production-preview h3 { color: #fff; }
.ui-production-preview p { color: #c9d7e8; }
.ui-production-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.ui-production-stat { padding: 15px 10px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 13px; background: rgba(255, 255, 255, .07); }
.ui-production-stat strong { display: block; color: #fff; font-size: 20px; letter-spacing: -.03em; }
.ui-production-stat small { color: #c5d3e4; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }

.ui-primary-actions { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
body.hypko-app .btn { min-height: 46px; padding: 11px 19px; border: 0; border-radius: 12px; font-weight: 800; transition: transform .15s ease, box-shadow .15s ease; }
body.hypko-app .btn:hover { transform: translateY(-1px); }
body.hypko-app .btn-primary { color: #fff; background: linear-gradient(135deg, var(--hypko-navy), var(--hypko-blue)); box-shadow: 0 9px 20px rgba(16, 39, 70, .18); }
body.hypko-app .btn-secondary { color: var(--hypko-navy); background: #fff; border: 1px solid var(--hypko-line); }
body.hypko-app .btn-success { color: var(--hypko-navy); background: var(--hypko-gold); box-shadow: 0 9px 20px rgba(242, 183, 5, .2); }

body.hypko-app #errorMessage { min-height: 0; margin-top: 14px !important; }

/* Result surfaces */
body.hypko-app #resultsSection,
body.hypko-app #costingResultsSection,
body.hypko-app #laborCostResults,
body.hypko-app #electricityCostResults,
body.hypko-app #depreciationCostResults,
body.hypko-app #overheadsResults,
body.hypko-app #finalCostResults,
body.hypko-app #profitResults { margin-top: 20px !important; overflow-x: auto; text-align: left !important; }

body.hypko-app .result-title {
  margin: 0 0 14px;
  padding: 0 !important;
  color: var(--hypko-navy) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 18px !important;
  font-weight: 800;
  text-align: left !important;
}

body.hypko-app table.table {
  width: 100%;
  min-width: 690px;
  margin: 0;
  overflow: hidden;
  color: var(--hypko-ink);
  background: #fff;
  border: 1px solid var(--hypko-line) !important;
  border-radius: 14px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
body.hypko-app table.table th { padding: 13px 12px; color: #536176; background: #f1f5f9 !important; border: 0 !important; border-bottom: 1px solid var(--hypko-line) !important; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
body.hypko-app table.table td { padding: 13px 12px; background: #fff !important; border: 0 !important; border-bottom: 1px solid #edf1f5 !important; }
body.hypko-app table.table tr:last-child td { border-bottom: 0 !important; }
body.hypko-app .brick-weight { margin-top: 13px; padding: 13px 15px; color: var(--hypko-navy); background: var(--hypko-gold-soft); border: 1px solid #f1d86c; border-radius: 13px; text-align: center; }

/* Cost toggles and cards */
.ui-cost-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, .7fr); align-items: start; gap: 20px; }
.ui-cost-stack { display: grid; gap: 12px; }
.ui-switch-shell { margin: 0 !important; padding: 0; }

body.hypko-app .custom-checkbox-container,
.ui-switch-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px;
  min-height: 70px;
  margin: 0 !important;
  padding: 14px 17px !important;
  color: var(--hypko-ink);
  text-align: left !important;
  background: #fff !important;
  border: 1px solid var(--hypko-line) !important;
  border-radius: 16px !important;
}
body.hypko-app .custom-checkbox-container label,
.ui-switch-row label { flex: 1; margin: 0 !important; color: var(--hypko-navy); font-size: 15px; font-weight: 800 !important; cursor: pointer; }
body.hypko-app input[type="checkbox"] { accent-color: var(--hypko-blue); }
body.hypko-app .custom-checkbox-container input[type="checkbox"],
.ui-switch-row input[type="checkbox"] { width: 42px; height: 22px; flex: 0 0 auto; }

.ui-cost-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hypko-line);
  border-radius: 16px;
}
.ui-cost-card[open] { border-color: #b8c8da; box-shadow: var(--hypko-shadow-soft); }
.ui-cost-card > summary { display: flex; align-items: center; gap: 13px; min-height: 74px; padding: 14px 17px; list-style: none; cursor: pointer; }
.ui-cost-card > summary::-webkit-details-marker { display: none; }
.ui-cost-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 12px; color: var(--hypko-navy); background: #eef3f8; font-weight: 900; }
.ui-cost-title { flex: 1; }
.ui-cost-title strong { display: block; color: var(--hypko-navy); }
.ui-cost-title small { color: var(--hypko-muted); }
.ui-cost-state { color: var(--hypko-green); font-size: 11px; font-weight: 800; text-align: right; }
.ui-chevron { color: var(--hypko-muted); font-size: 18px; transition: transform .2s; }
.ui-cost-card[open] .ui-chevron { transform: rotate(180deg); }
.ui-cost-content { padding: 18px; border-top: 1px solid var(--hypko-line); background: #fbfcfe; }
.ui-cost-content > section, .ui-cost-content > div { margin-top: 0 !important; }
.ui-cost-content h4 { display: none; }

body.hypko-app #costingSection { padding: 18px; border: 1px solid var(--hypko-line); border-radius: 16px; background: #fbfcfe; }
body.hypko-app #costingSection > h4 { margin: 0 0 14px; color: var(--hypko-navy); font-size: 17px; font-weight: 800; }
body.hypko-app #costInputs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
body.hypko-app #costInputs > div { padding: 14px; border: 1px solid var(--hypko-line); border-radius: 13px; background: #fff; }
body.hypko-app #indirectSection[style*="block"] { display: grid !important; gap: 12px; }

.ui-live-summary { position: sticky; top: 92px; padding: 21px; color: #fff; background: var(--hypko-navy); border-radius: 18px; box-shadow: var(--hypko-shadow); }
.ui-live-summary h3 { margin: 0 0 4px; color: #fff; font-size: 16px; font-weight: 800; }
.ui-live-summary > p { margin: 0 0 18px; color: #bdccdf; font-size: 12px; }
.ui-summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }
.ui-summary-row span { color: #c8d5e5; }
.ui-summary-row strong { color: #fff; }
.ui-summary-total { margin-top: 12px; padding: 15px; color: var(--hypko-navy); background: var(--hypko-gold); border-radius: 13px; }
.ui-summary-total small { display: block; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.ui-summary-total strong { display: block; margin-top: 2px; font-size: 25px; letter-spacing: -.04em; }

/* Final report */
body.hypko-app #finalCostSection { margin-top: 0 !important; }
body.hypko-app #finalCostSection > h4 { margin: 0 0 16px; color: var(--hypko-navy); font-size: 18px; font-weight: 800; text-align: left !important; }

body.hypko-app #finalCostResults table { min-width: 0; border: 0 !important; background: transparent; }
body.hypko-app #finalCostResults table tbody { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
body.hypko-app #finalCostResults table tr { display: block; padding: 20px; overflow: hidden; background: #fff !important; border: 1px solid var(--hypko-line); border-radius: 17px; }
body.hypko-app #finalCostResults table tr:last-child { color: #fff; background: linear-gradient(145deg, var(--hypko-navy), var(--hypko-navy-2)) !important; border-color: var(--hypko-navy); }
body.hypko-app #finalCostResults table th,
body.hypko-app #finalCostResults table td { display: block; padding: 0; background: transparent !important; border: 0 !important; text-align: left; }
body.hypko-app #finalCostResults table th { color: var(--hypko-muted); font-size: 11px; text-transform: none; letter-spacing: 0; }
body.hypko-app #finalCostResults table td { margin-top: 8px; color: var(--hypko-navy); font-size: 25px; font-weight: 850; letter-spacing: -.04em; }
body.hypko-app #finalCostResults table tr:last-child th,
body.hypko-app #finalCostResults table tr:last-child td { color: #fff; }

.ui-profit-inputs { padding: 20px; margin-top: 18px; border: 1px solid var(--hypko-line); border-radius: 17px; background: #f7f9fc; }
body.hypko-app #profitSection > h4 { margin: 0 0 16px; color: var(--hypko-navy); font-size: 18px; font-weight: 800; }
body.hypko-app #profitSection .form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0; }
body.hypko-app #profitSection .form-group { width: auto; max-width: none; padding: 0; }
body.hypko-app #profitResults > div { padding: 20px !important; border: 1px solid var(--hypko-line); border-radius: 16px !important; background: #f8fbfe !important; }
body.hypko-app #profitResults > div > div { padding: 6px 0; }

body.hypko-app .disclaimer { margin: 20px 0 0 !important; padding: 14px 16px !important; color: #57657a; background: #eef3f8 !important; border: 0 !important; border-radius: 13px !important; font-size: 11px !important; }
body.hypko-app .disclaimer strong { color: var(--hypko-navy); }
body.hypko-app .disclaimer ul { margin: 7px 0 0; padding-left: 18px; }

body.hypko-app footer {
  margin: 20px 0 0 !important;
  padding: 22px !important;
  color: #cbd6e5 !important;
  background: var(--hypko-navy) !important;
  border-radius: 16px;
}
body.hypko-app footer p { margin: 3px 0; font-size: 12px; }
body.hypko-app footer a { color: #ffe06b; }

.ui-tutorials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
.ui-tutorial-card { display: flex; align-items: center; gap: 12px; padding: 14px; color: var(--hypko-navy); background: #fff; border: 1px solid var(--hypko-line); border-radius: 14px; text-decoration: none !important; transition: .18s ease; }
.ui-tutorial-card:hover { color: var(--hypko-blue); border-color: #aac0d5; transform: translateY(-1px); box-shadow: var(--hypko-shadow-soft); }
.ui-play { display: grid; place-items: center; flex: 0 0 36px; height: 36px; color: #fff; background: var(--hypko-blue); border-radius: 11px; }
.ui-tutorial-card strong { display: block; font-size: 13px; }
.ui-tutorial-card small { display: block; color: var(--hypko-muted); font-size: 10px; }

.ui-footer-nav { display: flex; justify-content: space-between; gap: 12px; padding: 20px 34px; border-top: 1px solid var(--hypko-line); background: #fbfcfe; }
.ui-nav-button { min-height: 46px; padding: 11px 20px; border: 0; border-radius: 12px; font-weight: 850; }
.ui-nav-button.back { color: var(--hypko-navy); background: #fff; border: 1px solid var(--hypko-line); }
.ui-nav-button.next { color: #fff; background: linear-gradient(135deg, var(--hypko-navy), var(--hypko-blue)); box-shadow: 0 9px 20px rgba(16, 39, 70, .18); }
.ui-nav-button[disabled] { opacity: .45; cursor: not-allowed; }

/* Floating actions */
body.hypko-app #fabContainer { right: 18px; bottom: 18px; z-index: 75; gap: 10px; }
body.hypko-app .fabBtn { width: 52px; height: 52px; color: #fff; background: var(--hypko-navy); border-radius: 15px; box-shadow: 0 10px 24px rgba(16, 39, 70, .22); }
body.hypko-app .fabBtn.reset { background: #b94d4d; }

/* Lead capture modal */
.hypko-lead-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 24, 44, .7);
  backdrop-filter: blur(7px);
}

.hypko-lead-card {
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 24px;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .3);
}

.hypko-lead-head { padding: 27px 28px 22px; color: #fff; background: linear-gradient(135deg, var(--hypko-navy), var(--hypko-navy-2)); }
.hypko-lead-logo { display: block; width: 150px; height: auto; margin-bottom: 17px; filter: brightness(0) invert(1); opacity: .96; }
.hypko-lead-kicker { display: inline-flex; padding: 6px 9px; color: var(--hypko-navy); background: var(--hypko-gold); border-radius: 8px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.hypko-lead-head h2 { margin: 12px 0 6px; color: #fff; font-size: 25px; font-weight: 800; }
.hypko-lead-head p { margin: 0; color: #cad8e8; font-size: 13px; }
body.hypko-app #lead_form { display: grid; gap: 14px; margin: 0; padding: 24px 28px 28px; border: 0; border-radius: 0; }
body.hypko-app #lead_form label { margin: 0 0 -7px; }
body.hypko-app #lead_form input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #ccd6e2; border-radius: 12px; outline: none; }
body.hypko-app #lead_form input:focus { border-color: var(--hypko-blue); box-shadow: 0 0 0 3px rgba(35, 104, 162, .1); }
.hypko-lead-phone { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.hypko-country-code { display: grid; place-items: center; min-height: 48px; color: var(--hypko-navy); background: #f6f8fb; border: 1px solid #ccd6e2; border-radius: 12px; font-weight: 800; }
.hypko-lead-consent { color: var(--hypko-muted); font-size: 11px; line-height: 1.45; }
.hypko-lead-consent a { color: var(--hypko-blue); }
.hypko-lead-privacy { padding: 11px 13px; color: #4d6a60; background: #edf8f3; border-radius: 11px; font-size: 11px; }
body.hypko-app #lead_submit { min-height: 48px; padding: 11px 16px; color: var(--hypko-navy); background: var(--hypko-gold); border: 0; border-radius: 12px; font-weight: 850; }
body.hypko-app #lead_submit:disabled { opacity: .65; cursor: wait; }

/* Legacy surfaces are incorporated into the enhanced shell */
body.hypko-app > #seoSummary,
body.hypko-app > .steps-guide { display: none !important; }
body.hypko-app #printLogo { display: none; }

@media (max-width: 900px) {
  body.hypko-app .hero-box { grid-template-columns: 1fr; }
  .ui-hero-metric { min-height: 165px; }
  body.hypko-app .brick-size-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.hypko-app .raw-materials-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .ui-production-layout, .ui-cost-layout { grid-template-columns: 1fr; }
  .ui-live-summary { position: static; }
}

@media (max-width: 680px) {
  body.hypko-app .brand-strip .container { min-height: 62px; padding: 9px 15px !important; flex-direction: row !important; }
  body.hypko-app .brand-strip .brand-logo { width: 155px !important; max-height: 43px; }
  body.hypko-app .brand-text { display: none; }
  body.hypko-app .hero { width: calc(100% - 20px); min-height: 0; margin-top: 14px !important; border-radius: 21px; }
  body.hypko-app .hero-box { display: block; min-height: 0; padding: 27px 22px !important; }
  body.hypko-app .hero h1 { font-size: 36px !important; }
  .ui-hero-copy { font-size: 15px; }
  .ui-hero-metric { display: none; }
  .ui-benefits { gap: 9px; }
  .ui-hero-details { margin-top: 20px; }
  .ui-workspace { width: calc(100% - 20px); margin-top: 14px; border-radius: 20px; }
  .ui-stepper { display: none; }
  .ui-mobile-progress, .ui-mobile-line { display: block; }
  .ui-stepper-wrap { padding: 16px 18px; }
  .ui-step-panel { padding: 23px 17px; }
  .ui-panel-heading { display: block; }
  .ui-panel-heading h2 { font-size: 22px; }
  body.hypko-app .brick-size-options { gap: 9px !important; }
  body.hypko-app .brick-size-options .brick-option.ui-brick-card { padding: 7px; border-radius: 14px; }
  .ui-brick-media { border-radius: 10px; }
  .ui-brick-label { padding: 8px 3px 2px; }
  .ui-brick-label small { display: none; }
  .ui-check-badge { top: 13px; right: 13px; }
  .ui-dimension-grid, body.hypko-app .raw-materials-grid, body.hypko-app #ratioInputs, body.hypko-app #costInputs, body.hypko-app #profitSection .form-row { grid-template-columns: 1fr !important; }
  .ui-ratio-top { align-items: stretch; flex-direction: column; }
  .ui-segmented { width: 100%; }
  .ui-production-stats { grid-template-columns: 1fr; }
  .ui-production-stat { display: flex; justify-content: space-between; align-items: center; }
  body.hypko-app #finalCostResults table tbody { grid-template-columns: 1fr; }
  .ui-tutorials { grid-template-columns: 1fr; }
  .ui-footer-nav { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; padding: 12px 14px; background: rgba(255, 255, 255, .95); backdrop-filter: blur(15px); box-shadow: 0 -8px 25px rgba(16, 39, 70, .1); }
  .ui-footer-nav .ui-nav-button { flex: 1; }
  body.hypko-app #fabContainer { bottom: 78px; }
  .hypko-lead-card { border-radius: 20px; }
  .hypko-lead-head, body.hypko-app #lead_form { padding-left: 21px; padding-right: 21px; }
}

@media print {
  body.hypko-app { background: #fff; }
  body.hypko-app .brand-strip,
  body.hypko-app .hero,
  .ui-stepper-wrap,
  .ui-footer-nav,
  body.hypko-app #fabContainer,
  .ui-tutorials,
  .ui-switch-row,
  .custom-checkbox-container { display: none !important; }
  .ui-workspace { width: 100%; margin: 0; border: 0; box-shadow: none; }
  .ui-step-panel { display: none !important; }
  #ui-step-5 { display: block !important; padding: 0; }
  body.hypko-app #printLogo { display: block; opacity: .06; position: fixed; top: 50%; left: 50%; width: 80%; transform: translate(-50%, -50%); z-index: -1; }
}
