/*
 * Lakelaw Can I Keep My House Calculator
 * Version: 1.0.0
 *
 * Red/black brand scheme. All rules scoped under .llkh-wrap to prevent
 * theme bleed. Mirrors the Liquidation Analysis calculator's visual
 * language so both tools feel like one family.
 */

/* -- CSS Variables ----------------------------------------------- */
.llkh-wrap {
  --red:        #990000;
  --red-dark:   #7a0000;
  --red-pale:   rgba(153,0,0,0.05);
  --red-border: rgba(153,0,0,0.20);
  --black:      #1c1c1c;
  --bg:         #f4efe8;
  --green:      #2d6a4f;
  --green-lt:   #e8ffe8;
  --green-bd:   #b7e4c7;
  --yellow-lt:  #fff8e1;
  --yellow-bd:  #ffe082;
  --gray-800:   #333333;
  --gray-600:   #555555;
  --gray-500:   #666666;
  --gray-400:   #888888;
  --gray-300:   #999999;
  --gray-200:   #bbbbbb;
  --gray-100:   #dddddd;
  --gray-50:    #eeeeee;
  --white:      #ffffff;

  --sans: 'Open Sans', -apple-system, 'Segoe UI', Arial, sans-serif;
  --radius: 6px;
  --radius-lg: 8px;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);

  font-family: var(--sans);
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.6;
}

.llkh-wrap *,
.llkh-wrap *::before,
.llkh-wrap *::after { box-sizing: border-box; }

/* -- Layout ------------------------------------------------------ */
.llkh-wrap .llkh-inner {
  max-width: 620px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

/* -- Title block ------------------------------------------------- */
.llkh-wrap .llkh-title-block { text-align: center; margin-bottom: 24px; }
.llkh-wrap .llkh-title-block h1 {
  font-size: 24px; font-weight: 800; color: var(--black);
  line-height: 1.25; margin: 0 0 8px;
}
.llkh-wrap .llkh-divider {
  width: 50px; height: 4px; background: var(--red);
  border-radius: 2px; margin: 0 auto 10px;
}
.llkh-wrap .llkh-title-block p {
  font-size: 13px; color: var(--gray-400);
  max-width: 460px; margin: 0 auto;
}

/* -- Cards ------------------------------------------------------- */
.llkh-wrap .llkh-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 16px;
  border-top: 3px solid var(--red);
}
.llkh-wrap .llkh-card h2 {
  font-size: 15px; font-weight: 800; color: var(--black);
  margin: 0 0 14px; text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* -- Gateway / disqualification --------------------------------- */
.llkh-wrap .llkh-section-eyebrow {
  font-size: 11px; font-weight: 700; color: var(--red);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 10px;
}
.llkh-wrap .llkh-eyebrow-warn { color: var(--red); }
.llkh-wrap .llkh-gateway-q {
  font-size: 18px; font-weight: 700; color: var(--black);
  margin: 0 0 10px; line-height: 1.35;
}
.llkh-wrap .llkh-gateway-sub {
  font-size: 13px; color: var(--gray-500);
  line-height: 1.6; margin: 0 0 20px;
}
.llkh-wrap .llkh-gateway-btns {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.llkh-wrap .llkh-btn-primary {
  flex: 1; min-width: 160px; padding: 14px 0;
  border-radius: 0; border: none; cursor: pointer;
  background: var(--red); color: var(--white);
  font-family: var(--sans); font-weight: 700; font-size: 15px;
  transition: background 0.15s;
}
.llkh-wrap .llkh-btn-primary:hover { background: var(--red-dark); }
.llkh-wrap .llkh-btn-link { display: block; text-align: center; text-decoration: none; }
.llkh-wrap .llkh-btn-ghost {
  flex: 1; min-width: 160px; padding: 14px 0;
  border-radius: 0; border: 2px solid var(--gray-100);
  cursor: pointer; background: var(--white); color: var(--gray-500);
  font-family: var(--sans); font-weight: 600; font-size: 14px;
  transition: border-color 0.15s;
}
.llkh-wrap .llkh-btn-ghost:hover { border-color: var(--gray-200); }
.llkh-wrap .llkh-card-warn { border-left: 4px solid var(--red); }
.llkh-wrap .llkh-card-warn h2 {
  text-transform: none; font-size: 18px; letter-spacing: 0;
}
.llkh-wrap .llkh-card-warn p {
  font-size: 14px; color: var(--gray-600); line-height: 1.7;
  margin: 0 0 14px;
}
.llkh-wrap .llkh-card-note p {
  font-size: 12px; color: var(--gray-400); line-height: 1.6;
  margin: 0;
}

/* -- Form fields ------------------------------------------------- */
.llkh-wrap .llkh-label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--gray-400); margin-bottom: 4px;
  text-transform: uppercase; letter-spacing: 0.10em;
}
.llkh-wrap .llkh-field { margin-bottom: 14px; }
.llkh-wrap .llkh-field-row {
  display: flex; gap: 12px; margin-bottom: 14px;
}
.llkh-wrap .llkh-field-row .llkh-field { flex: 1; margin-bottom: 0; }
.llkh-wrap .llkh-field-note {
  font-size: 10px; color: var(--gray-200); margin-top: 3px;
}

.llkh-wrap .llkh-dollar-wrap { position: relative; }
.llkh-wrap .llkh-dollar {
  position: absolute; left: 8px; top: 50%;
  transform: translateY(-50%);
  color: var(--gray-200); font-size: 13px; pointer-events: none;
}
.llkh-wrap .llkh-input {
  width: 100%; padding: 10px 10px 10px 22px;
  border-radius: var(--radius); border: 2px solid var(--gray-100);
  font-family: var(--sans); font-size: 14px; color: var(--gray-800);
  outline: none; transition: border-color 0.2s; background: var(--white);
}
.llkh-wrap .llkh-input:focus { border-color: var(--red); }
.llkh-wrap .llkh-input-plain {
  width: 100%; padding: 10px;
  border-radius: var(--radius); border: 2px solid var(--gray-100);
  font-family: var(--sans); font-size: 14px; color: var(--gray-800);
  outline: none; transition: border-color 0.2s; background: var(--white);
}
.llkh-wrap .llkh-input-plain:focus { border-color: var(--red); }
.llkh-wrap .llkh-input::-webkit-inner-spin-button,
.llkh-wrap .llkh-input::-webkit-outer-spin-button,
.llkh-wrap .llkh-input-plain::-webkit-inner-spin-button,
.llkh-wrap .llkh-input-plain::-webkit-outer-spin-button { -webkit-appearance: none; }
.llkh-wrap .llkh-input[type=number],
.llkh-wrap .llkh-input-plain[type=number] { -moz-appearance: textfield; }

/* -- Filing type buttons ---------------------------------------- */
.llkh-wrap .llkh-filing-group {
  display: flex; gap: 12px; margin-bottom: 16px;
}
.llkh-wrap .llkh-filing-btn {
  flex: 1; padding: 12px 10px;
  border-radius: var(--radius); cursor: pointer;
  border: 2px solid var(--gray-100); background: var(--white);
  text-align: left; transition: all 0.2s;
  font-family: var(--sans);
}
.llkh-wrap .llkh-filing-btn.llkh-active {
  border-color: var(--red); background: var(--red-pale);
}
.llkh-wrap .llkh-filing-btn-label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--gray-800);
}
.llkh-wrap .llkh-filing-btn.llkh-active .llkh-filing-btn-label {
  color: var(--red-dark);
}
.llkh-wrap .llkh-filing-btn-desc {
  display: block; font-size: 10px; color: var(--gray-300);
  margin-top: 2px; line-height: 1.3;
}

/* -- Toggle switch ---------------------------------------------- */
.llkh-wrap .llkh-toggle-row {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 10px 0;
  border-top: 1px solid var(--gray-50);
}
.llkh-wrap .llkh-toggle-slider {
  width: 40px; height: 22px; border-radius: 11px;
  background: var(--gray-100); position: relative;
  transition: background 0.2s; flex-shrink: 0;
}
.llkh-wrap .llkh-toggle-slider.llkh-on { background: var(--red); }
.llkh-wrap .llkh-toggle-knob {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); position: absolute;
  top: 2px; left: 2px; transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.llkh-wrap .llkh-toggle-slider.llkh-on .llkh-toggle-knob { left: 20px; }
.llkh-wrap .llkh-toggle-label {
  font-size: 14px; color: var(--gray-800); font-weight: 500;
}
.llkh-wrap .llkh-tbe-sub { margin-left: 50px; margin-top: -4px; }

.llkh-wrap .llkh-banner-green {
  background: var(--green-lt); border: 1px solid var(--green-bd);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 12px; color: var(--green); line-height: 1.5;
  margin-top: 8px;
}
.llkh-wrap .llkh-banner-red {
  background: var(--red-pale); border: 1px solid var(--red-border);
  border-radius: var(--radius); padding: 10px 14px;
  font-size: 12px; color: var(--red-dark); line-height: 1.5;
  margin-top: 8px;
}

/* -- Calculate button ------------------------------------------- */
.llkh-wrap .llkh-calc-btn {
  width: 100%; padding: 14px 0;
  border-radius: var(--radius); border: none; cursor: pointer;
  background: var(--red); color: var(--white);
  font-family: var(--sans); font-size: 15px; font-weight: 700;
  transition: background 0.2s;
}
.llkh-wrap .llkh-calc-btn:disabled {
  background: var(--gray-100); cursor: not-allowed;
}
.llkh-wrap .llkh-calc-btn:not(:disabled):hover { background: var(--red-dark); }

/* -- Results ---------------------------------------------------- */
.llkh-wrap .llkh-verdict {
  border-radius: var(--radius-lg);
  padding: 24px; text-align: center;
  margin-bottom: 16px; border: 2px solid transparent;
}
.llkh-wrap .llkh-verdict.safe {
  background: var(--green-lt); border-color: var(--green-bd);
}
.llkh-wrap .llkh-verdict.marginal {
  background: var(--yellow-lt); border-color: var(--yellow-bd);
}
.llkh-wrap .llkh-verdict.risky {
  background: var(--red-pale); border-color: var(--red-border);
}
.llkh-wrap .llkh-verdict-icon {
  font-size: 32px; margin-bottom: 6px;
}
.llkh-wrap .llkh-verdict-title {
  font-size: 19px; font-weight: 800; color: var(--black);
  margin: 0 0 8px;
}
.llkh-wrap .llkh-verdict-desc {
  font-size: 13px; color: var(--gray-600); line-height: 1.6;
  margin: 0;
}

/* Three-test pill row */
.llkh-wrap .llkh-test-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-50);
}
.llkh-wrap .llkh-test-row:last-child { border-bottom: none; }
.llkh-wrap .llkh-test-pill {
  display: inline-block;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0; min-width: 96px; text-align: center;
}
.llkh-wrap .llkh-test-pill.safe {
  background: var(--green-lt); color: var(--green);
  border: 1px solid var(--green-bd);
}
.llkh-wrap .llkh-test-pill.marginal {
  background: var(--yellow-lt); color: #8a6d00;
  border: 1px solid var(--yellow-bd);
}
.llkh-wrap .llkh-test-pill.risky {
  background: var(--red-pale); color: var(--red-dark);
  border: 1px solid var(--red-border);
}
.llkh-wrap .llkh-test-label {
  font-size: 13px; color: var(--gray-800); line-height: 1.4;
}

/* Waterfall rows (shared vocabulary with liquidation calc) */
.llkh-wrap .llkh-waterfall-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 8px 0; border-bottom: 1px solid var(--gray-50);
}
.llkh-wrap .llkh-waterfall-row:last-child { border-bottom: none; }
.llkh-wrap .llkh-row-label {
  font-size: 14px; font-weight: 500; color: var(--gray-800);
}
.llkh-wrap .llkh-row-label.llkh-bold { font-weight: 700; }
.llkh-wrap .llkh-row-note {
  font-size: 11px; color: var(--gray-200);
}
.llkh-wrap .llkh-row-amount {
  font-size: 14px; font-weight: 700; color: var(--gray-800);
  white-space: nowrap;
}
.llkh-wrap .llkh-row-amount.llkh-bold { font-size: 17px; }
.llkh-wrap .llkh-waterfall-spacer { height: 6px; }
.llkh-wrap .llkh-waterfall-total {
  margin-top: 10px; padding-top: 10px;
  border-top: 3px solid var(--black);
  display: flex; justify-content: space-between; align-items: baseline;
}
.llkh-wrap .llkh-waterfall-total-label {
  font-size: 15px; font-weight: 800; color: var(--black);
}
.llkh-wrap .llkh-waterfall-total-note {
  font-size: 11px; color: var(--gray-300);
}
.llkh-wrap .llkh-waterfall-total-amount {
  font-size: 20px; font-weight: 800;
}

/* -- CTA card --------------------------------------------------- */
.llkh-wrap .llkh-cta {
  background: var(--black);
  border-radius: var(--radius-lg);
  padding: 28px; text-align: center;
  margin-bottom: 16px;
}
.llkh-wrap .llkh-cta h3 {
  font-size: 18px; font-weight: 800; color: var(--white);
  margin: 0 0 8px;
}
.llkh-wrap .llkh-cta p {
  font-size: 13px; color: rgba(255,255,255,0.5);
  margin-bottom: 14px; line-height: 1.6;
}
.llkh-wrap .llkh-cta a {
  display: inline-block; background: var(--red); color: var(--white);
  padding: 12px 28px; border-radius: var(--radius);
  text-decoration: none; font-family: var(--sans);
  font-weight: 700; font-size: 14px;
}
.llkh-wrap .llkh-cta a:hover { background: var(--red-dark); }
.llkh-wrap .llkh-cta-phone {
  margin-top: 10px; font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* -- Start Over button ------------------------------------------ */
.llkh-wrap .llkh-reset-btn {
  width: 100%; padding: 12px 0;
  border-radius: var(--radius);
  border: 2px solid var(--gray-100);
  background: var(--white); color: var(--gray-500);
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: border-color 0.2s;
  margin-top: 4px;
}
.llkh-wrap .llkh-reset-btn:hover { border-color: var(--gray-200); }

/* -- Disclaimer ------------------------------------------------- */
.llkh-wrap .llkh-disclaimer {
  font-size: 10px; color: var(--gray-200);
  text-align: center; line-height: 1.6;
  margin-top: 24px;
}

/* -- Fade-in animation ------------------------------------------ */
@keyframes llkhFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.llkh-wrap .llkh-fade { animation: llkhFadeIn 0.4s ease; }

/* -- Responsive ------------------------------------------------- */
@media (max-width: 520px) {
  .llkh-wrap .llkh-field-row { flex-direction: column; gap: 0; }
  .llkh-wrap .llkh-field-row .llkh-field { margin-bottom: 14px; }
  .llkh-wrap .llkh-filing-group { flex-direction: column; }
  .llkh-wrap .llkh-title-block h1 { font-size: 20px; }
  .llkh-wrap .llkh-card { padding: 18px; }
  .llkh-wrap .llkh-test-pill { min-width: 80px; }
}

/* -- Print ------------------------------------------------------ */
@media print {
  .llkh-wrap { background: #fff; }
  .llkh-wrap .llkh-card { box-shadow: none; border: 1px solid #ddd; }
  .llkh-wrap .llkh-calc-btn,
  .llkh-wrap .llkh-reset-btn { display: none !important; }
}
