@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #f5f1eb;
  --ink: #1f1b16;
  --muted: #5b5146;
  --accent: #1f6f78;
  --accent-soft: #d4eef0;
  --card: #fffaf4;
  --border: #e1d7c9;
  --shadow: rgba(31, 27, 22, 0.08);
}

[data-theme='dark'] {
  --bg: #101820;
  --ink: #e7eef2;
  --muted: #9cb0bd;
  --accent: #6dc7d2;
  --accent-soft: #1e3f47;
  --card: #17232c;
  --border: #2b3e4b;
  --shadow: rgba(2, 10, 16, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  background: radial-gradient(circle at top left, #fff5e6, transparent 55%),
    radial-gradient(circle at 70% 30%, #e3f4f7, transparent 50%), var(--bg);
  color: var(--ink);
}

[data-theme='dark'] body {
  background:
    radial-gradient(circle at top left, rgba(24, 54, 68, 0.45), transparent 55%),
    radial-gradient(circle at 70% 30%, rgba(11, 31, 40, 0.75), transparent 50%),
    var(--bg);
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.hero {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  margin-bottom: 40px;
}

.hero-text h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.6rem, 3vw, 3.4rem);
  margin: 8px 0 12px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 460px;
}

.hero-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 30px var(--shadow);
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

label {
  font-weight: 600;
  color: var(--muted);
}

input,
select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #ffffff;
  color: var(--ink);
}

button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

[data-theme='dark'] input,
[data-theme='dark'] select {
  background: #132029;
}

#themeToggle {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 9px 12px;
}

#themeToggle:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 111, 120, 0.25);
}

.meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.section {
  margin-top: 40px;
}

.section-head h2 {
  font-family: 'Fraunces', serif;
  margin: 0 0 10px;
}

.section-head p {
  margin: 0 0 16px;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 30px var(--shadow);
}

.notes ul {
  padding-left: 18px;
  margin: 10px 0 0;
}

.notes li {
  margin-bottom: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

tbody td {
  padding: 10px 6px;
  border-bottom: 1px solid rgba(225, 215, 201, 0.6);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  margin-right: 6px;
}

.eligible {
  color: #0f6b47;
  font-weight: 600;
}

.ineligible {
  color: #b53d2c;
  font-weight: 600;
}

#feedbackForm {
  display: grid;
  gap: 12px;
}

#feedbackText {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}

[data-theme='dark'] #feedbackText {
  background: #132029;
}

#feedbackStatus {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.property-card details > summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.property-card details[open] > summary {
  margin-bottom: 16px;
}

#propertyShowAll {
  margin-top: 14px;
}

@media (max-width: 700px) {
  .page {
    padding: 32px 16px 60px;
  }

  .responsive-table {
    font-size: 0.92rem;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 12px;
  }

  .responsive-table tbody td {
    display: grid;
    grid-template-columns: minmax(120px, 42%) 1fr;
    gap: 12px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid rgba(225, 215, 201, 0.45);
    word-break: break-word;
  }

  .responsive-table tbody td:last-child {
    border-bottom: none;
  }

  .responsive-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
  }

  .responsive-table tbody tr.empty-row td {
    display: block;
    border-bottom: none;
    padding: 2px 0;
  }

  .responsive-table tbody tr.empty-row td::before {
    content: none;
  }
}
