:root {
  --bg:          #f5f0e8;
  --surface:     #f0ebe1;
  --surface2:    #ece6da;
  --input-bg:    #ffffff;
  --text:        #1a1a18;
  --text-dim:    #6b6860;
  --border:      rgba(26,26,24,0.15);
  --accent:      #c9a96e;
  --accent-hover:#b8965c;
  --green:       #4a8c5c;
  --green-bg:    #e6f4ec;
  --red:         #c0392b;
  --red-bg:      #fdecea;
  --r:           12px;
  --shadow:      0 2px 12px rgba(26,26,24,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  padding: 2.5rem 1.25rem 6rem;
  line-height: 1.6;
}

.wrap { max-width: 860px; margin: 0 auto; }

/* ── Header ── */
.site-header {
  margin-bottom: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.header-content {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.site-header h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}
.site-header h1 span { color: var(--accent); }
.site-header p { color: var(--text-dim); font-size: 0.95rem; }
.upgrade-btn {
  margin-top: 16px;
  background: #C9A96E;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease;
}
.upgrade-btn:hover {
  background: #B8936B;
}
.upgrade-btn.unlocked {
  background: #27ae60;
  cursor: default;
}

/* ── Section card ── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.section-title {
  font-family: Georgia, serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Section 1 title with action button */
#section-1 .section-title {
  justify-content: space-between;
  gap: 1rem;
}
.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Section restart button ── */
.btn-section-restart {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-section-restart:hover {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}
.btn-section-restart:active {
  transform: scale(0.98);
}
.section-subtext {
  font-size: 0.84rem;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

/* ── Fields ── */
.form-row {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 150px;
}
.field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field input,
.field select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.18);
}
.field input::placeholder { color: var(--text-dim); opacity: 0.7; }
.field input[readonly] {
  background: var(--surface2);
  color: var(--text-dim);
  cursor: default;
  border-color: transparent;
}
.field input[readonly]:focus { box-shadow: none; border-color: transparent; }

/* ── Error state ── */
.field input.error,
.common-area-value.error {
  border-color: var(--red);
  background: var(--red-bg);
  color: var(--red);
}
.field input.error:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.18);
}
.room-area-warning {
  font-size: 0.75rem;
  color: var(--red);
  font-weight: 500;
  margin-top: 0.25rem;
}

/* ── Input with unit suffix ── */
.input-with-suffix { position: relative; display: block; }
.input-with-suffix input { padding-right: 3.6rem !important; }
.input-suffix {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 0.78rem;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ── Section 1 main 5-col row ── */
.s1-main-row {
  display: grid;
  grid-template-columns: 80px 120px 1fr 1fr 180px;
  gap: 16px;
  align-items: end;
}
#currency-symbol { max-width: 80px; }
#area-unit { max-width: 110px; }

/* ── Section 1: Simple room cards ── */
.s1-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.9rem;
  margin-top: 1.5rem;
}
.s1-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  animation: fadeIn 0.2s ease;
}
.s1-card-label {
  font-family: Georgia, serif;
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.s1-card .field label { font-size: 0.7rem; }
.s1-card .field input { padding: 0.45rem 0.65rem; font-size: 0.88rem; }
.s1-fields { display: flex; flex-direction: column; gap: 0.6rem; }

/* ── Common area ── */
.common-area-block {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.common-area-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.8rem;
}
.common-area-block > div:first-of-type {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.common-area-value {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-dim);
  width: 180px;
  flex-shrink: 0;
  cursor: default;
}
.common-area-hint {
  flex: 1;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  line-height: 1.55;
  background: transparent;
  margin-top: 0;
}

/* ── Section 2: Expanded room cards ── */
.s2-placeholder {
  font-size: 0.88rem;
  color: var(--text-dim);
  font-style: italic;
  padding: 1rem 0 0.5rem;
  text-align: center;
}
.s2-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  animation: fadeIn 0.25s ease;
}
.s2-card-header {
  font-family: Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}
.s2-fields { display: flex; flex-direction: column; gap: 1rem; }
.s2-row1 { display: flex; gap: 1rem; }
.s2-row1 .field { flex: 1; }
.s2-row2 { display: flex; gap: 1rem; align-items: flex-start; }
.s2-row2-col { flex: 1; display: flex; flex-direction: column; }
.s2-row2-col .field { flex-shrink: 0; margin-bottom: 0.75rem; }
.explanation-box {
  flex: 1;
  font-size: 13px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  line-height: 1.55;
  background: transparent;
  margin-top: 0;
}

/* ── Features label ── */
.features-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

/* ── Accordion ── */
.accordion-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--surface2);
  cursor: pointer;
  user-select: none;
  transition: background 0.12s;
}
.accordion-header:hover { background: var(--bg); }
.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.accordion-count {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}
.accordion-chevron {
  font-size: 0.65rem;
  color: var(--text-dim);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.accordion-group.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease, padding 0.28s ease;
  padding: 0 1rem;
  background: var(--surface);
}
.accordion-group.open .accordion-body {
  max-height: 900px;
  padding: 0.85rem 1rem;
}
.feat-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.4rem 1rem;
}
.feat-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.83rem;
  color: var(--text);
  user-select: none;
}
.feat-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Custom feature row ── */
.custom-feat-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--border);
  align-items: center;
}
.custom-feat-row input[type="text"] {
  flex: 1;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
}
.custom-feat-row input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201,169,110,0.18);
}
.custom-feat-row input[type="text"]::placeholder { color: var(--text-dim); opacity: 0.7; }
.btn-add-feat {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}
.btn-add-feat:hover { background: var(--bg); }
.btn-add-feat:disabled {
  background: #e8e8e8;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}
.btn-add-feat:disabled:hover {
  background: #e8e8e8;
}
.room-custom-input:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
  opacity: 0.6;
}
.custom-feat-pro-lock {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  font-style: italic;
}
.custom-feats-list { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.custom-feat-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.2rem 0.7rem 0.2rem 0.9rem;
  font-size: 0.78rem;
  color: var(--text);
}
.custom-feat-tag button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
}
.custom-feat-tag button:hover { color: var(--red); }

/* ── Utility table ── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.utility-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
}
table.utility-table th,
table.utility-table td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: center;
  white-space: nowrap;
}
table.utility-table th {
  background: var(--surface2);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.utility-table th.feature-col { text-align: left; min-width: 200px; }
table.utility-table th.room-col { text-align: left; min-width: 90px; }
table.utility-table td.feature-name {
  text-align: left;
  color: var(--text);
  font-size: 0.85rem;
  white-space: normal;
}
table.utility-table td.feature-rooms {
  text-align: left;
  font-size: 0.78rem;
  color: var(--text-dim);
  white-space: normal;
}
.util-instructions-list {
  margin: 0.45rem 0 0.55rem 1.2rem;
}
.util-instructions-list li {
  font-size: 0.84rem;
  color: var(--text-dim);
  line-height: 1.55;
}
.section-subtext p + p { margin-top: 0.45rem; }
.util-input {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.4rem;
  font-size: 0.88rem;
  font-family: inherit;
  color: var(--text);
  width: 70px;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.util-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201,169,110,0.2);
}
.feature-owner-cell {
  background-color: #D4EDDA;
  border-radius: 6px;
}
.col-total-row td {
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface2);
}
.col-total-row td.total-ok { background: var(--green-bg); color: var(--green); }
.col-total-row td.total-bad { background: var(--red-bg); color: var(--red); }
.utility-hint {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 1rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface2);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(201,169,110,0.3);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled {
  background: #d4c5a8;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface); }

/* Feature Weight Slider */
.feature-weight-section {
  margin-top: 0;
  padding-top: 0;
}
.feature-weight-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-weight-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.feature-weight-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.feature-weight-left-label,
.feature-weight-right-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: 90px;
}
.feature-weight-left-label {
  text-align: right;
}
.feature-weight-right-label {
  text-align: left;
}
.feature-weight-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--surface2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.feature-weight-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}
.feature-weight-slider::-webkit-slider-thumb:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.feature-weight-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}
.feature-weight-slider::-moz-range-thumb:hover {
  background: var(--accent-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.feature-weight-slider:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.feature-weight-slider:disabled::-webkit-slider-thumb {
  background: #ccc;
  cursor: not-allowed;
}
.feature-weight-slider:disabled::-moz-range-thumb {
  background: #ccc;
  cursor: not-allowed;
}
.feature-weight-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  text-align: center;
}
.feature-weight-pro-lock {
  /* Styled inline in HTML */
}

.btn-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  justify-content: center;
}

/* ── Error ── */
.error-msg {
  display: none;
  color: var(--red);
  font-size: 0.82rem;
  margin-top: 0.75rem;
  padding: 0.55rem 0.9rem;
  background: var(--red-bg);
  border-radius: 8px;
  border-left: 3px solid var(--red);
}
.error-msg.visible { display: block; }

/* ── Results ── */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.result-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}
.result-card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.result-room-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}
.result-tenant-name { font-family: Georgia, serif; font-size: 1.15rem; color: var(--text); }
/* ── Result card summary ── */
.result-summary { margin-top: 1rem; }
.result-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  font-size: 0.88rem;
  gap: 0.5rem;
}
.result-line + .result-line { border-top: 1px solid rgba(26,26,24,0.06); }
.result-line-label { color: var(--text-dim); }
.result-line-value { color: var(--text); font-weight: 500; text-align: right; white-space: nowrap; }
.result-line-value.pos { color: var(--red); }
.result-line-value.neg { color: var(--green); }
.result-feat-line .result-line-label { display: flex; align-items: center; gap: 0.4rem; }
.result-feat-toggle {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.68rem;
  cursor: pointer;
  padding: 0 0.1rem;
  line-height: 1;
  flex-shrink: 0;
  font-family: inherit;
}
.result-feat-toggle:hover { color: var(--accent); }
.result-feat-list { display: none; padding: 0.3rem 0 0.1rem 0.5rem; }
.result-feat-list.open { display: block; }
.result-feat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.18rem 0;
  font-size: 0.8rem;
  gap: 0.5rem;
}
.result-feat-name { color: var(--text-dim); white-space: normal; }
.result-feat-val { text-align: right; white-space: nowrap; font-weight: 500; }
.result-feat-val.pos { color: var(--red); }
.result-feat-val.neg { color: var(--green); }
.result-separator { border: none; border-top: 1px solid var(--border); margin: 0.55rem 0; }
.result-total-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.2rem 0;
}
.result-total-label { font-family: Georgia, serif; font-size: 0.95rem; color: var(--text); }
.result-total-value {
  font-family: Georgia, serif;
  font-size: 1.8rem;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.result-vs-baseline { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.15rem; }
.result-vs-baseline .pos { color: var(--red); }
.result-vs-baseline .neg { color: var(--green); }
.result-pdf-note {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-style: italic;
}
/* Results Actions - New Layout */
.results-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}
.results-actions-row-1 {
  display: grid;
  grid-template-columns: 0.75fr 1fr 1.5fr;
  gap: 12px;
  margin-top: 32px;
}
.results-actions-row-1 .btn {
  padding: 12px 16px;
  white-space: nowrap;
}
.results-actions-row-2 {
  display: flex;
  gap: 16px;
  align-items: flex-end;
}
.results-actions-col-left {
  flex: 0 0 33.333%;
  display: flex;
}
.results-actions-col-left .btn {
  width: 100%;
  padding: 12px 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.results-actions-col-right {
  flex: 0 0 66.667%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.email-capture-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.email-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.email-input-group input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
}
.email-input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201, 169, 110, 0.2);
}
.email-input-group .btn {
  padding: 10px 16px;
  white-space: nowrap;
}
.email-message {
  font-size: 0.85rem;
  color: #27ae60;
}
.results-actions-row-3 {
  margin-top: 24px;
}
.btn-text-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0;
  text-decoration: none;
  transition: color 0.2s ease, text-decoration 0.2s ease;
  color: var(--text-dim);
}
.btn-text-link:hover {
  color: var(--text);
  text-decoration: underline;
}
.btn-start-over {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 1.5px solid #C0392B;
  color: #C0392B;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-start-over:hover {
  background: #FDF0EE;
}
.btn-gold-outline {
  background: transparent;
  border: 1px solid #C9A96E;
  color: #C9A96E;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-gold-outline:hover {
  background: rgba(201, 169, 110, 0.05);
  border-color: #B8965C;
  color: #B8965C;
}
.btn-gold-outline:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: #e0e0e0;
  color: #999;
}
.results-tagline {
  margin-top: 24px;
  font-size: 0.75rem;
  color: #9B9890;
  text-align: center;
  font-style: italic;
}

/* ── Calculate button prominence ── */
#calculate-btn {
  display: block;
  margin: 0 auto;
  min-width: 300px;
  padding: 16px 48px;
  font-size: 1rem;
  font-weight: 700;
}
.calc-reminder {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 0.65rem;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media print {
  .btn-row, .results-actions-row, .results-tagline, .section-card:not(#results-section) { display: none !important; }
  #results-section { display: block !important; }
  body { padding: 1rem; }
  .result-feat-list { display: block !important; }
}

@media (max-width: 600px) {
  body { padding: 1.25rem 0.85rem 4rem; }
  .section-card { padding: 1.25rem; }
  .s1-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .s2-name-sqft { flex-direction: column; }
  .feat-check-grid { grid-template-columns: 1fr 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .result-total-value { font-size: 1.5rem; }
  .results-actions-row-1 { grid-template-columns: 1fr; }
  .results-actions-row-1 .btn { padding: 14px 16px; }
  .results-actions-row-2 { flex-direction: column; align-items: stretch; }
  .results-actions-col-left { flex: 0 0 auto; }
  .results-actions-col-left .btn { height: auto; }
  .results-actions-col-right { flex: 0 0 auto; }
  .email-input-group { flex-direction: column; }
  .email-input-group input { width: 100%; }
  .email-input-group .btn { width: 100%; }
}

/* ── Results charts & validation ── */
.results-summary-divider {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 2.5rem 0 2rem;
}
.results-summary-divider::before {
  content: '';
  flex: 1;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.results-summary-divider-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.results-summary-divider::after {
  content: '';
  flex: 1;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.results-viz {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.results-viz-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
}
.chart-block {
  background: var(--surface);
  border-radius: var(--r);
  padding: 1.25rem 1.5rem 1.5rem;
  border: 1px solid var(--border);
}
.chart-label,
.chart-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  text-align: center;
}
/* Validation table */
.val-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.val-table td {
  padding: 0.35rem 0.5rem;
  color: var(--text);
}
.val-table td:not(:first-child) {
  text-align: right;
}
.val-table tr + tr td {
  border-top: 1px solid var(--border);
}
.val-table .val-total-row td {
  font-weight: 700;
  border-top: 2px solid var(--border);
  padding-top: 0.55rem;
}
.val-table .val-check {
  color: var(--green);
  font-size: 1rem;
}
/* ── Custom Dropdown (Rooms) ── */
#num-roommates {
  display: none;
}
.custom-dropdown-wrapper {
  position: relative;
  width: 100%;
}
.custom-dropdown {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-family: inherit;
  height: 38px;
  box-sizing: border-box;
}
.custom-dropdown:hover {
  background: #fafaf8;
}
.custom-dropdown.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}
.custom-dropdown-arrow {
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}
.custom-dropdown.open .custom-dropdown-arrow {
  transform: rotate(180deg);
}
.custom-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
}
.custom-dropdown-item {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  user-select: none;
}
.custom-dropdown-item:hover {
  background: var(--surface2);
}
.custom-dropdown-item.selected {
  background: var(--surface2);
  font-weight: 500;
}
.custom-dropdown-item.locked {
  color: var(--text-dim);
}
.custom-dropdown-item.locked:hover {
  background: #f9f9f9;
}

/* ── Custom Dropdown (Occupants) ── */
.custom-occ-dropdown {
  position: relative;
}
.custom-dropdown-occ {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  font-family: inherit;
  height: 38px;
  box-sizing: border-box;
}
.custom-dropdown-occ:hover {
  background: #fafaf8;
}
.custom-dropdown-occ.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}
.custom-dropdown-list-occ {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: none;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}
.custom-dropdown-item-occ {
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text);
  user-select: none;
}
.custom-dropdown-item-occ:hover {
  background: var(--surface2);
}
.custom-dropdown-item-occ.selected {
  background: var(--surface2);
  font-weight: 500;
}
.custom-dropdown-item-occ.locked-occ {
  color: var(--text-dim);
}
.custom-dropdown-item-occ.locked-occ:hover {
  background: #f9f9f9;
}

/* ── Pro Modal ── */
#pro-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#pro-modal > div {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  text-align: center;
}
#pro-modal h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}
#pro-modal p {
  margin: 0 0 24px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}
#pro-modal button {
  border: none;
  border-radius: 6px;
  padding: 12px 24px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}
#pro-unlock-btn {
  background: #D4AF37;
  color: #000;
}
#pro-unlock-btn:hover {
  background: #c99f2e;
}
#pro-cancel-btn {
  background: #e0e0e0;
  color: #333;
}
#pro-cancel-btn:hover {
  background: #d0d0d0;
}
@media (max-width: 640px) {
  .results-viz-top { grid-template-columns: 1fr; }
}
@media print {
  .results-viz { display: none !important; }
}
