* {
  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; }
}
