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

:root {
  --green: #2d5016;
  --green-light: #4a7c2e;
  --green-bg: #f0f5ec;
  --sand: #f5f0e8;
  --sand-dark: #e8dfd3;
  --text: #2c2c2c;
  --text-light: #666;
  --white: #fff;
  --border: #ddd;
  --status-top-pick: #dc2626;
  --status-viewed: #1a6b3c;
  --status-viewing: #1a6b3c;
  --status-interested: #2563eb;
  --status-discuss: #9333ea;
  --status-deprioritised: #888;
  --status-fantasy: #c084fc;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--sand);
  color: var(--text);
  line-height: 1.6;
}

nav {
  background: var(--green);
  padding: 0.75rem 1.5rem;
  display: flex;
  gap: 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--white);
  border-bottom-color: var(--white);
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h1 {
  font-size: 2rem;
  color: var(--green);
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
}

.card h2 {
  color: var(--green);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--green-bg);
}

.card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.card ul {
  padding-left: 1.5rem;
}

.card li {
  margin-bottom: 0.25rem;
}

/* People */
#people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.person-card {
  background: var(--green-bg);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.person-card strong {
  color: var(--green);
}

.role, .location {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* Dates */
.dates-list {
  list-style: none;
  padding: 0;
}

.dates-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--green-bg);
}

.dates-list li:last-child {
  border-bottom: none;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--green);
}

.filter-btn.active {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.filter-btn .count {
  opacity: 0.7;
}

/* Property cards */
.property-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--border);
}

.property-card.status-top_pick { border-left-color: var(--status-top-pick); border-left-width: 5px; }
.property-card.status-viewed { border-left-color: var(--status-viewed); }
.property-card.status-viewing_booked { border-left-color: var(--status-viewing); }
.property-card.status-interested { border-left-color: var(--status-interested); }
.property-card.status-to_discuss { border-left-color: var(--status-discuss); }
.property-card.status-deprioritised { border-left-color: var(--status-deprioritised); opacity: 0.75; }
.property-card.status-fantasy { border-left-color: var(--status-fantasy); }

.property-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.status-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.top_pick { background: #fef2f2; color: var(--status-top-pick); font-weight: 600; }
.status-badge.viewed { background: #dcfce7; color: var(--status-viewed); }
.status-badge.viewing_booked { background: #dcfce7; color: var(--status-viewing); }
.status-badge.interested { background: #dbeafe; color: var(--status-interested); }
.status-badge.to_discuss { background: #f3e8ff; color: var(--status-discuss); }
.status-badge.deprioritised { background: #f3f4f6; color: var(--status-deprioritised); }
.status-badge.fantasy { background: #faf5ff; color: var(--status-fantasy); }

.property-date {
  font-size: 0.8rem;
  color: var(--text-light);
}

.property-card h3 {
  margin-bottom: 0.5rem;
}

.property-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.property-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.meta-tag {
  background: var(--sand);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  color: var(--text-light);
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.feature-tag {
  background: var(--green-bg);
  color: var(--green);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.viewing-info {
  background: #dcfce7;
  color: var(--status-viewing);
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

details {
  margin-bottom: 0.75rem;
}

summary {
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.feedback-list {
  padding-left: 1.25rem;
  font-size: 0.85rem;
}

.feedback-list li {
  margin-bottom: 0.4rem;
  color: var(--text-light);
}

.feedback-list strong {
  color: var(--text);
}

.property-link {
  color: var(--green-light);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.property-link:hover {
  text-decoration: underline;
}

/* Viewings page */
.viewing-entry {
  display: flex;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--green-bg);
}

.viewing-entry:last-child {
  border-bottom: none;
}

.viewing-time {
  min-width: 70px;
  font-weight: 700;
  color: var(--green);
  font-size: 1.1rem;
  padding-top: 0.1rem;
}

.viewing-detail h3 {
  color: var(--green);
}

.viewing-detail p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.viewing-detail a {
  color: var(--green-light);
  text-decoration: none;
  font-size: 0.85rem;
}

.viewing-detail a:hover {
  text-decoration: underline;
}

.notes-section {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--sand);
  border-radius: 6px;
}

.notes-section h4 {
  font-size: 0.85rem;
  color: var(--green);
  margin-bottom: 0.5rem;
}

.placeholder {
  font-style: italic;
  color: #aaa;
  font-size: 0.85rem;
}

/* Member cards */
.member-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.member-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.member-header strong {
  color: var(--green);
  font-size: 1.05rem;
}

.member-location {
  font-size: 0.8rem;
  color: var(--text-light);
}

.member-role {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.member-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.4rem 0;
}

.member-skills span {
  background: var(--green-bg);
  color: var(--green);
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

.member-financial {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

.member-awaiting {
  font-size: 0.85rem;
  color: #aaa;
  font-style: italic;
}

/* Viewing status tags */
.status-tag {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.status-tag.confirmed {
  background: #dcfce7;
  color: #1a6b3c;
}

.status-tag.unconfirmed {
  background: #fef3c7;
  color: #92400e;
}

.viewing-warning {
  background: #fef3c7;
  color: #92400e;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.backup-info {
  background: var(--sand);
  border-left: 3px solid #f59e0b;
  padding: 0.75rem;
  border-radius: 0 6px 6px 0;
  margin: 0.75rem 0;
}

.backup-info h4 {
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.backup-info p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.info-banner {
  background: #dbeafe;
  color: #1e40af;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

/* Legal page */
.legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.legal-item {
  background: var(--green-bg);
  border-radius: 6px;
  padding: 1rem;
}

.legal-item h4 {
  color: var(--green);
  margin-bottom: 0.4rem;
}

.legal-item p, .legal-item ul {
  font-size: 0.9rem;
  color: var(--text);
}

.legal-item ul {
  padding-left: 1.25rem;
  margin-top: 0.4rem;
}

.legal-item.highlight {
  background: #dbeafe;
}

.legal-item.highlight h4 {
  color: #1e40af;
}

.legal-item.caution {
  background: #fef3c7;
}

.legal-item.caution h4 {
  color: #92400e;
}

.model-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.model-box {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.model-box h3 {
  color: var(--green);
  margin-bottom: 0.1rem;
}

.model-subtitle {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 0.75rem;
}

.model-box ul {
  padding-left: 1.25rem;
  font-size: 0.9rem;
}

.model-box li {
  margin-bottom: 0.3rem;
}

.model-example {
  background: var(--sand);
  padding: 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.card-inner {
  background: var(--green-bg);
  border-radius: 6px;
  padding: 1rem;
  margin-top: 1rem;
}

.card-inner h3 {
  color: var(--green);
  margin-bottom: 0.5rem;
}

.card-inner p {
  font-size: 0.9rem;
}

.key-question {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 1rem;
  border-radius: 0 6px 6px 0;
  margin-top: 1.5rem;
}

.key-question h4 {
  color: #92400e;
  margin-bottom: 0.4rem;
}

.key-question p {
  font-size: 0.9rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.legal-table th {
  background: var(--green);
  color: white;
  padding: 0.6rem 0.75rem;
  text-align: left;
  font-weight: 500;
}

.legal-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.legal-table tr:nth-child(even) td {
  background: var(--sand);
}

.legal-table td:first-child {
  font-weight: 500;
  min-width: 140px;
}

/* Funding list */
.funding-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.funding-item {
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid var(--border);
}

.funding-item.priority-high { border-left-color: var(--status-viewing); background: #f0fdf4; }
.funding-item.priority-med { border-left-color: #f59e0b; background: #fffbeb; }
.funding-item.priority-low { border-left-color: var(--border); background: var(--sand); }

.funding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.funding-header h4 {
  margin: 0;
}

.priority-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.priority-tag.high { background: #dcfce7; color: #1a6b3c; }
.priority-tag.med { background: #fef3c7; color: #92400e; }
.priority-tag.low { background: #f3f4f6; color: #666; }

.funding-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* Action items */
.action-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-item {
  padding: 1rem;
  border-radius: 6px;
  border-left: 4px solid var(--border);
}

.action-item.urgent {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.action-item.soon {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.action-item h4 {
  margin-bottom: 0.3rem;
}

.action-item.urgent h4::before {
  content: "URGENT: ";
  color: #ef4444;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-item.soon h4::before {
  content: "NEXT: ";
  color: #f59e0b;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.action-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* Reference models */
.ref-model {
  padding: 1rem 0;
  border-bottom: 1px solid var(--green-bg);
}

.ref-model:last-child {
  border-bottom: none;
}

.ref-model h3 {
  color: var(--green);
  margin-bottom: 0.4rem;
}

.ref-model p {
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

/* Responsive */
@media (max-width: 600px) {
  main { padding: 1rem; }
  h1 { font-size: 1.5rem; }
  .viewing-entry { flex-direction: column; gap: 0.25rem; }
  .viewing-time { min-width: auto; }
  #people-grid { grid-template-columns: 1fr; }
}

/* ===== Auth ===== */
.narrow { max-width: 560px; }
#nav-auth { margin-left: auto; display: flex; gap: 1rem; align-items: center; }
#nav-auth .nav-user { color: rgba(255,255,255,0.85); font-size: 0.9rem; }
.auth-tabs { display: flex; gap: 0.5rem; margin: 1rem 0; flex-wrap: wrap; }
.auth-tabs button {
  background: var(--white); color: var(--green); border: 1px solid var(--green);
  border-radius: 6px; padding: 0.4rem 0.9rem; cursor: pointer; font-size: 0.85rem;
}
.auth-tabs button.active { background: var(--green); color: var(--white); }
.auth-panel form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.auth-panel label { display: flex; flex-direction: column; font-size: 0.9rem; gap: 0.25rem; }
.auth-panel input, .auth-panel select, .auth-panel textarea {
  padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.95rem;
  font-family: inherit;
}
.auth-panel button[type=submit] {
  background: var(--green); color: var(--white); border: 0; padding: 0.6rem 1rem;
  border-radius: 6px; cursor: pointer; font-size: 0.95rem;
}
.auth-panel .hint { color: var(--text-light); font-size: 0.85rem; }
.auth-msg { padding: 0.75rem; border-radius: 6px; margin-top: 1rem; }
.auth-msg.info    { background: #eef; }
.auth-msg.success { background: #e6f4e6; color: #1a6b3c; }
.auth-msg.error   { background: #fde7e7; color: #b00; }

/* ===== Voting property cards ===== */
.vote-list { display: flex; flex-direction: column; gap: 1.5rem; }
.vote-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.5rem; display: grid; grid-template-columns: 1fr auto; gap: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.vote-card h2 { color: var(--green); font-size: 1.2rem; margin-bottom: 0.25rem; }
.vote-card .meta { color: var(--text-light); font-size: 0.85rem; margin-bottom: 0.75rem; }
.vote-card .summary { font-size: 0.95rem; margin-bottom: 1rem; }
.vote-card .totals {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem;
  background: var(--green-bg); border-radius: 8px; padding: 1rem; min-width: 260px;
  align-self: start;
}
.vote-card .totals .t { text-align: center; }
.vote-card .totals .n { font-size: 1.4rem; font-weight: 600; color: var(--green); display: block; }
.vote-card .totals .l { font-size: 0.72rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.vote-card .actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; justify-content: flex-end; }
.vote-card button.vote-btn {
  background: var(--green); color: var(--white); border: 0; border-radius: 6px;
  padding: 0.5rem 1.1rem; cursor: pointer;
}
.vote-card button.vote-btn.voted { background: var(--green-light); }
.vote-card .progress { grid-column: 1 / -1; }
.vote-card .progress-bar {
  height: 6px; background: var(--sand-dark); border-radius: 3px; overflow: hidden;
}
.vote-card .progress-bar > span {
  display: block; height: 100%; background: var(--green);
}

@media (max-width: 720px) {
  .vote-card { grid-template-columns: 1fr; }
  .vote-card .totals { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Vote modal ===== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex;
  align-items: flex-start; justify-content: center; z-index: 200; padding: 2rem 1rem;
  overflow-y: auto;
}
.modal {
  background: var(--white); border-radius: 10px; max-width: 720px; width: 100%;
  padding: 1.5rem;
}
.modal h2 { color: var(--green); margin-bottom: 0.5rem; }
.modal section { margin: 1rem 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.modal section:first-of-type { border-top: 0; padding-top: 0; }
.modal label { display: block; font-size: 0.9rem; margin-bottom: 0.6rem; }
.modal label > span { display: block; margin-bottom: 0.2rem; }
.modal input, .modal select, .modal textarea {
  width: 100%; padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px;
  font-size: 0.95rem; font-family: inherit;
}
.modal .row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.modal .row label { margin-bottom: 0; }
.modal .projection {
  border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem; margin: 0.5rem 0;
}
.modal .projection .del {
  background: none; border: 0; color: #b00; cursor: pointer; font-size: 0.85rem; float: right;
}
.modal .btns { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1rem; }
.modal .btns button {
  border: 0; border-radius: 6px; padding: 0.55rem 1.1rem; cursor: pointer; font-size: 0.95rem;
}
.modal .btns .save { background: var(--green); color: var(--white); }
.modal .btns .cancel { background: var(--sand-dark); }
.modal .add-btn {
  background: var(--sand-dark); border: 0; border-radius: 6px;
  padding: 0.4rem 0.8rem; cursor: pointer; font-size: 0.85rem;
}

/* Onboarding block below login form */
.onboarding { margin-top: 2rem; }
.onboarding h3 {
  color: var(--green);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}
.onboarding ol, .onboarding ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}
.onboarding li { margin-bottom: 0.3rem; font-size: 0.95rem; }
.onboarding code {
  background: var(--sand-dark);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.85em;
}
.onboarding .hint { font-size: 0.85rem; color: var(--text-light); margin-top: 0.5rem; }

/* Legal page: landscape of models */
.landscape-table-wrap { overflow-x: auto; margin-bottom: 1rem; }
.landscape-table-wrap table { min-width: 640px; }
.model-detail {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin: 0.5rem 0;
  background: var(--white);
}
.model-detail summary {
  cursor: pointer;
  padding: 0.25rem 0;
  color: var(--green);
  font-size: 0.95rem;
}
.model-detail[open] {
  background: var(--green-bg);
}
.model-detail ul, .model-detail p { margin-top: 0.5rem; font-size: 0.92rem; }
.model-detail ul { padding-left: 1.25rem; }
.sources-list { padding-left: 1.25rem; font-size: 0.9rem; }
.sources-list li { margin-bottom: 0.3rem; }

/* ===== Expanded property card (v2) ===== */
.vote-card-v2 {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: grid;
  grid-template-rows: auto auto auto auto;
  overflow: hidden;
}
.card-photo {
  height: 220px;
  background: var(--sand-dark);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-placeholder {
  color: var(--text-light); font-size: 0.85rem;
}
.card-head {
  padding: 1rem 1.25rem 0.25rem;
}
.card-head .title {
  color: var(--green);
  font-size: 1.25rem;
  margin: 0 0 0.25rem;
}
.card-head .meta {
  color: var(--text-light); font-size: 0.85rem;
}
.card-head .meta a { color: var(--green-light); }

.card-body {
  padding: 0.75rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
}
.card-left .summary { margin-bottom: 0.75rem; font-size: 0.95rem; }
.section-h { color: var(--green); font-size: 0.95rem; margin: 0.75rem 0 0.5rem; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.feature-list li {
  background: var(--green-bg);
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  line-height: 1.35;
}
.f-kind {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.05rem 0.4rem;
  border-radius: 3px;
  margin-right: 0.35rem;
  background: var(--white);
  color: var(--text-light);
  vertical-align: middle;
}
.f-dwelling { background: #dcfce7; color: #1a6b3c; }
.f-building { background: #e0e7ff; color: #3b38a0; }
.f-land     { background: #fef3c7; color: #92400e; }
.f-amenity  { background: #fce7f3; color: #9d174d; }
.f-size { color: var(--text-light); font-size: 0.8rem; }
.f-live {
  background: var(--green); color: var(--white);
  padding: 0.05rem 0.4rem; border-radius: 3px; font-size: 0.7rem;
}
.f-desc { color: var(--text-light); font-size: 0.8rem; margin-top: 0.2rem; }

.feedback-details { margin-top: 0.5rem; }
.feedback-details summary { cursor: pointer; color: var(--text-light); font-size: 0.85rem; }
.fb-row { font-size: 0.85rem; margin: 0.35rem 0; }

.card-right {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.mini-maps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.mini-map {
  height: 128px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
  background: var(--sand-dark);
}
.mini-map .map-label {
  position: absolute;
  top: 4px; left: 6px;
  background: rgba(255,255,255,0.9);
  padding: 1px 6px;
  font-size: 0.7rem;
  border-radius: 3px;
  z-index: 500;
  pointer-events: none;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.map-placeholder {
  color: var(--text-light);
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  height: 100%;
}
.card-right .totals {
  grid-template-columns: 1fr 1fr;
  min-width: 0;
  align-self: stretch;
}

.card-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1.25rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--green-bg);
}
.card-footer .progress-bar {
  height: 8px; background: var(--sand-dark); border-radius: 4px; overflow: hidden;
  margin-bottom: 0.35rem;
}
.card-footer .progress-bar > span { display:block; height:100%; background: var(--green); }
.card-footer .prog-label {
  font-size: 0.8rem; color: var(--text-light);
}
.card-footer .vote-btn {
  background: var(--green); color: var(--white);
  border: 0; border-radius: 6px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
}
.card-footer .vote-btn.voted { background: var(--green-light); }

@media (max-width: 800px) {
  .card-body { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .card-right .totals { grid-template-columns: 1fr 1fr; }
}

/* Admin page */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th, .admin-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table th {
  background: var(--green);
  color: var(--white);
  font-weight: 500;
  font-size: 0.85rem;
}
.admin-table .save-btn {
  background: var(--green); color: var(--white);
  border: 0; border-radius: 4px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.admin-table .row-msg {
  color: var(--text-light);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

/* ===== Account form (account.html) =====
   Vertical-rhythm form with consistent field structure: label ▸ input ▸ help.
   Two-column rows collapse to one column under 600px. */
.account-form { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 0.75rem; }
.account-form .field { display: flex; flex-direction: column; gap: 0.35rem; }
.account-form .field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 600px) {
  .account-form .field-row { grid-template-columns: 1fr; }
}
.account-form label {
  font-size: 0.82rem; font-weight: 600; color: var(--green);
  letter-spacing: 0.02em;
}
.account-form .help { font-size: 0.8rem; color: var(--text-light); margin-top: 0.1rem; }
.account-form input[type=text],
.account-form input[type=email],
.account-form input[type=password],
.account-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.account-form input:focus,
.account-form textarea:focus {
  outline: 0;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45,80,22,0.15);
}
.account-form input:disabled {
  background: var(--green-bg);
  color: var(--text-light);
  cursor: not-allowed;
}
.account-form textarea { min-height: 5.5rem; resize: vertical; line-height: 1.45; }
.account-form .actions {
  display: flex; align-items: center; gap: 0.85rem;
  margin-top: 0.25rem;
}
.account-form button.primary {
  background: var(--green);
  color: var(--white);
  border: 0;
  border-radius: 6px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.15s;
}
.account-form button.primary:hover { background: var(--green-light); }
.account-form .feedback { font-size: 0.85rem; }
.account-form .feedback.ok  { color: #1a6b3c; }
.account-form .feedback.err { color: #b00; }

/* ===== Top property mini-cards (index.html) ===== */
#top-props { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.top-prop {
  display: flex; gap: 1rem; align-items: stretch;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.75rem; text-decoration: none; color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.top-prop:hover { border-color: var(--green); box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.top-prop-thumb {
  width: 90px; flex-shrink: 0; border-radius: 6px;
  background: var(--green-bg) center/cover no-repeat;
  min-height: 64px;
}
.top-prop-body { display: flex; flex-direction: column; justify-content: center; gap: 0.25rem; }
.top-prop-body strong { color: var(--green); font-size: 1rem; }
.top-prop-meta { font-size: 0.85rem; color: var(--text-light); }

/* ===== Scenarios page (scenarios.html) ===== */
.scenario { margin-top: 1rem; }
.scenario h2 { color: var(--green); }
.scenario-tag {
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--green-bg);
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin: 0.3rem 0 0.75rem;
}
.scenario > p {
  margin-bottom: 1rem;
}
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 0.75rem 0;
}
@media (max-width: 720px) {
  .scenario-grid { grid-template-columns: 1fr; }
}
.scenario-grid > div > h4 {
  color: var(--green);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.stack-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.stack-table td {
  padding: 0.4rem 0.2rem;
  border-bottom: 1px solid var(--green-bg);
}
.stack-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text);
}
.stack-table tr.total td {
  font-weight: 600;
  color: var(--green);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.stack-table tr.per-member td {
  background: var(--green-bg);
  font-weight: 600;
  color: var(--green);
  font-size: 0.95rem;
}
.takeaway {
  background: var(--sand);
  padding: 0.9rem 1rem;
  border-radius: 6px;
  border-left: 4px solid var(--green);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-top: 0.75rem;
}
.takeaway strong { color: var(--green); }

/* Slider controls (scenarios.html) */
.controls .control-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1rem 0;
}
@media (max-width: 720px) {
  .controls .control-row { grid-template-columns: 1fr; }
}
.slider-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text);
}
.slider-label-row {
  display: flex;
  justify-content: space-between;
  font-weight: 500;
  color: var(--green);
}
.slider-label output {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.slider-label input[type=range] {
  width: 100%;
  accent-color: var(--green);
}

/* Terminology accordion items */
.term {
  border-bottom: 1px solid var(--green-bg);
  padding: 0.6rem 0;
}
.term:last-of-type { border-bottom: 0; }
.term > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.3rem 0;
  color: var(--text);
  font-size: 0.95rem;
}
.term > summary::before {
  content: '▸ ';
  color: var(--green);
  display: inline-block;
  margin-right: 0.25rem;
  transition: transform 0.15s;
}
.term[open] > summary::before {
  transform: rotate(90deg);
}
.term > summary strong { color: var(--green); }
.term > p {
  margin: 0.4rem 0 0.25rem 1.2rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

/* Side-by-side comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}
.compare-table th {
  text-align: left;
  color: var(--green);
  font-weight: 600;
  padding: 0.6rem 0.5rem;
  border-bottom: 2px solid var(--green);
  background: var(--green-bg);
}
.compare-table td {
  padding: 0.5rem 0.5rem;
  border-bottom: 1px solid var(--green-bg);
  vertical-align: top;
}
.compare-table td:first-child {
  font-weight: 500;
  color: var(--green);
}
.compare-table td[data-out] {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

/* Funding-stack + monthly column headers share a row of --green title */
.funding-stack, .monthly {
  background: var(--white);
}
