/* PLANERY: BuildCost / Byggkostnad — style.css (Del 1 av 2) */
:root {
  --bg: #f9f9f8;
  --surface: #ffffff;
  --surface-subtle: #f2f2f0;
  --subtle: #f2f2f0;
  --text: #141413;
  --text-muted: #666662;
  --muted: #666662;
  --border: #e5e5e2;
  --border-strong: #141413;
  --accent: #141413;
  --accent-text: #ffffff;
  --radius: 12px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #111110;
  --surface: #191918;
  --surface-subtle: #222220;
  --subtle: #222220;
  --text: #f4f4f2;
  --text-muted: #9a9a94;
  --muted: #9a9a94;
  --border: #2b2b28;
  --border-strong: #f4f4f2;
  --accent: #f4f4f2;
  --accent-text: #111110;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding: 1.5rem 1.25rem 3.5rem;
}

.container { max-width: 680px; margin: 0 auto; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.back-link { text-decoration: none; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; }
.back-link:hover { color: var(--text); }
.controls { display: flex; align-items: center; gap: 0.6rem; }

.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-btn { background: transparent; border: none; color: var(--text-muted); padding: 0.3rem 0.55rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; }
.lang-btn.active { background: var(--accent); color: var(--accent-text); }

.tool-hero { margin-bottom: 1.75rem; }
.byline { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.6rem; }
.tool-title-row { display: flex; align-items: flex-start; gap: 1rem; }
.tool-logo { width: 44px; height: 44px; flex-shrink: 0; margin-top: 0.15rem; }
.tool-hero h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.tool-hero p, .app-desc { color: var(--text-muted); font-size: 0.92rem; margin-top: 0.3rem; }


/* PLANERY: BuildCost / Byggkostnad — style.css (Del 2 av 2) */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.input, .select { width: 100%; min-height: 44px; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 10px 12px; font-size: 0.95rem; font-family: inherit; }
.input:focus, .select:focus { outline: none; border-color: var(--text); }

.btn-primary { width: 100%; background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent); border-radius: 8px; padding: 12px 16px; font-size: 0.95rem; font-weight: 600; cursor: pointer; }
.btn-secondary { background: var(--subtle); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-size: 0.85rem; font-weight: 500; cursor: pointer; }
.pill-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-btn { background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); border-radius: 8px; padding: 8px 12px; font-size: 0.85rem; cursor: pointer; }
.pill-btn.active { background: var(--subtle); color: var(--text); border-color: var(--text); font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 0.92rem; cursor: pointer; color: var(--text); }
.check-row input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }

.result-box { background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 20px; }
.result-top { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border); }
.result-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.sub-val { font-size: 1.15rem; font-weight: 700; color: var(--text); }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-item { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; font-size: 0.78rem; color: var(--text-muted); }
.stat-item strong { color: var(--text); font-size: 0.95rem; margin-top: 2px; }

.table-wrap { overflow-x: auto; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.spec-table th, .spec-table td { padding: 8px 6px; border-bottom: 1px solid var(--border); text-align: left; }
.spec-table th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; }
.spec-table th:nth-child(n+2), .spec-table td:nth-child(n+2) { text-align: right; white-space: nowrap; }

.source-summary { font-size: 0.85rem; font-weight: 600; color: var(--text); cursor: pointer; list-style: none; }
.source-summary::-webkit-details-marker { display: none; }
.source-summary::before { content: "+ "; color: var(--text-muted); font-weight: 700; }
details[open] .source-summary::before { content: "− "; }
.source-list { margin-top: 10px; padding-left: 18px; color: var(--text-muted); font-size: 0.82rem; display: flex; flex-direction: column; gap: 6px; }

.ad-slot { background: var(--subtle); border: 1px dashed var(--border); border-radius: var(--radius); min-height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.ad-label { font-size: 0.75rem; color: var(--text-muted); }
.footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--text-muted); padding-top: 16px; border-top: 1px solid var(--border); }
.footer-link { color: var(--text); text-decoration: none; }

.dev-badge { display: inline-block; margin-top: 8px; padding: 4px 10px; font-size: 0.78rem; font-weight: 600; background: var(--subtle); border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
.dev-lock { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 999; }
.dev-lock[hidden], .dev-badge[hidden], .pin-error[hidden] { display: none; }
.lock-box { width: 100%; max-width: 360px; text-align: center; }
.pin-input { text-align: center; font-size: 1.4rem; letter-spacing: 8px; font-weight: 700; }
.pin-error { color: #dc2626; font-size: 0.85rem; margin-top: 10px; }


/* === PLANERY: Tillägg för Husets Bygglista (klistra in allra längst ner i style.css) === */
.house-list { display: flex; flex-direction: column; gap: 8px; }
.house-row { display: flex; justify-content: space-between; align-items: center; background: var(--subtle); padding: 8px 12px; border-radius: 8px; font-size: 0.85rem; }
.del-btn { background: none; border: none; color: #dc2626; font-weight: 700; cursor: pointer; padding: 2px 6px; margin-left: 8px; }



