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

:root {
  --bg: #f2f6f4;
  --paper: #ffffff;
  --ink: #12201c;
  --muted: #556a63;
  --line: #d6e1dc;
  --brand: #1d6d5f;
  --brand-2: #145246;
  --danger: #9a2f3b;
  --ok: #0a8a68;
  --shadow: 0 10px 30px rgba(20, 45, 38, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Work Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, rgba(29, 109, 95, 0.15), transparent 36%),
    radial-gradient(circle at 100% 20%, rgba(154, 47, 59, 0.08), transparent 30%),
    var(--bg);
}

.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 26px 16px 8px;
}

.badge {
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-2);
}

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-top: 6px; }

.tagline {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 760px;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 16px 40px;
  display: grid;
  gap: 14px;
}

.layout { display: grid; gap: 14px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
}

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

.status.is-error { color: var(--danger); }

a { color: var(--brand-2); }

.form-grid { display: grid; gap: 10px; }
.split { display: grid; gap: 10px; }
.split.two { grid-template-columns: 1fr 1fr; }
.split.three { grid-template-columns: repeat(3, 1fr); }

label, legend {
  font-size: 0.9rem;
  font-weight: 600;
}

input, textarea, select, button { width: 100%; font: inherit; }

input, textarea, select {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

fieldset {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

fieldset label { font-weight: 500; }

.chips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

input[type="checkbox"] { width: auto; margin-right: 6px; }

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(130deg, var(--brand-2), var(--brand));
}

.btn-ghost {
  color: var(--brand-2);
  border: 1px solid #b7cec6;
  background: #eef6f3;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(130deg, #7f2330, var(--danger));
}

.btn.tiny {
  width: auto;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row .btn { width: auto; }

.install { margin-top: 12px; width: auto; }

.auth-card { border-color: #c0d7cf; }

.auth-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.auth-tab {
  width: auto;
  border: 1px solid #bfd4cc;
  border-radius: 999px;
  padding: 8px 14px;
  background: #f0f7f4;
  color: #214f44;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(130deg, var(--brand-2), var(--brand));
}

.account-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.photo-preview-wrap {
  display: grid;
  gap: 8px;
  align-content: start;
}

.photo-preview {
  width: 94px;
  height: 94px;
  border-radius: 14px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.discover-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.discover-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfefd;
  padding: 12px;
  min-height: 170px;
}

.discover-headline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(140deg, var(--brand), #2d8775);
}

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

.score {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--ok);
  font-weight: 700;
}

.tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  width: auto;
  border: 1px solid #bfd4cc;
  border-radius: 999px;
  padding: 7px 12px;
  background: #eef7f3;
  color: #214f44;
  font-weight: 600;
  cursor: pointer;
}

.chip.small {
  padding: 4px 9px;
  font-size: 0.78rem;
}

.empty {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 20px 6px;
}

.inbox-grid {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 12px;
}

.match-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.match-item button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fcfa;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  display: grid;
  gap: 3px;
  cursor: pointer;
}

.match-item button span { color: var(--muted); font-size: 0.82rem; }
.match-item.active button { border-color: var(--brand); background: #ebf7f3; }

.prompt-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.consent-row.compact {
  display: grid;
  gap: 6px;
}

.thread {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: 280px;
  overflow: auto;
}

.msg {
  border-radius: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  background: #f8fcfa;
}

.msg.me { background: #ebf7f3; border-color: #b9d9ce; }
.msg.them { background: #f7f8ff; border-color: #d9ddf5; }
.msg.system { background: #fff8ef; border-color: #f0ddbb; }
.msg .time { font-size: 0.74rem; color: var(--muted); }
.msg p { margin: 5px 0 0; }

.danger-zone {
  margin-top: 10px;
  border: 1px solid #f1c9cf;
  background: #fff7f8;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .inbox-grid { grid-template-columns: 1fr; }
  .split.two, .split.three { grid-template-columns: 1fr; }
  .discover-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 640px) {
  .hero { padding-top: 20px; }
  .auth-tabs { flex-wrap: wrap; }
  .account-strip { flex-direction: column; align-items: flex-start; }
}
