:root {
  --ink: #10211c;
  --ink-2: #1a332b;
  --paper: #f4efe4;
  --paper-2: #fffaf3;
  --text: #1c2421;
  --muted: #3e524c;
  --line: #e3d7c6;
  --coral: #8a2e0f;
  --coral-deep: #6d220b;
  --coral-soft: #fff1e8;
  --teal: #0f5c52;
  --teal-soft: #e5f4f1;
  --brass: #8a6a2f;
  --ok: #0f5c52;
  --err: #9f1239;
  --radius: 16px;
  --wrap: 1120px;
  --sans: "Inter", system-ui, sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --shadow: 0 18px 40px rgba(16, 33, 28, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
p { margin: 0 0 0.8rem; }
a { color: var(--teal); }
a:hover { color: var(--coral); }
.skip-link {
  position: absolute; left: 1rem; top: -4rem; background: var(--paper-2); color: var(--ink);
  padding: 0.6rem 1rem; z-index: 5; border-radius: 8px;
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(760px, calc(100% - 2rem)); }
.section { padding: 3.2rem 0; }
.section-alt { background: #efe7d8; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }
.eyebrow {
  display: flex; align-items: center; gap: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; font-weight: 680; color: var(--brass);
}
.muted { color: var(--muted); }
.help { color: var(--muted); font-size: 0.92rem; }

.site-header {
  position: sticky; top: 0; z-index: 4;
  background: rgba(244, 239, 228, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner, .footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 1.2rem; }
.header-inner { min-height: 74px; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 680; max-width: 16rem; }
.brand span { line-height: 1.15; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.8rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 560; padding: 0.45rem 0.2rem; }
.site-nav a[aria-current="page"] { color: var(--coral); }
.site-nav form { margin: 0; }

.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 44px; padding: 0.55rem 1rem; border-radius: 999px;
  background: var(--coral); color: #fffaf3; text-decoration: none; border: 2px solid var(--coral);
  font: 680 1rem/1 var(--sans); cursor: pointer;
}
.btn:hover { background: var(--coral-deep); color: #fffaf3; }
.btn-ghost, button.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fffaf3; border-color: rgba(255,250,243,0.45); }
.btn-ghost-light:hover { color: #fffaf3; border-color: #fffaf3; }
.btn-google { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }

.hero {
  background:
    radial-gradient(circle at 85% 15%, rgba(240, 181, 154, 0.28), transparent 26%),
    radial-gradient(circle at 8% 90%, rgba(31, 143, 126, 0.35), transparent 30%),
    var(--ink);
  color: #f6f1e7;
  padding: 4.5rem 0 3.5rem;
}
.hero h1 { color: #fffaf3; }
.hero em { font-style: italic; color: #f0b59a; }
.hero .lede { color: #d9e4df; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 0.8fr; gap: 2rem; align-items: center; }
.hero-search, .filters, .invite-form { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: end; }
.hero-search input, .filters input, .filters select, .field input, .field select, .field textarea, .invite-form select {
  width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--paper-2); color: var(--text); font: inherit; padding: 0.65rem 0.8rem;
}
.hero-search input { background: #fffaf3; color: var(--ink); min-width: min(100%, 280px); flex: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }
.hero-panel, .panel, .profile-card, .tank-card, .auth-card, .empty {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-panel { color: var(--ink); padding: 1.2rem 1.3rem; }
.panel-kicker, .chip {
  display: inline-block; margin: 0 0 0.6rem; padding: 0.15rem 0.55rem; border-radius: 999px;
  background: var(--teal-soft); color: var(--teal); font-size: 0.78rem; font-weight: 680; letter-spacing: 0.04em;
}
.mini-block + .mini-block { margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid var(--line); }
.mini-block ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.live-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #1f8f7e; box-shadow: 0 0 0 0 rgba(31,143,126,0.7); }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2.4s ease-out infinite; }
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(31,143,126,0); }
  100% { box-shadow: 0 0 0 0 rgba(31,143,126,0); }
}

.section-head, .tank-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.4rem; }
.stat-row { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; list-style: none; padding: 0; margin: 0; color: var(--muted); }
.stat-row strong { color: var(--ink); font-family: var(--serif); font-size: 1.4rem; display: block; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.profile-card { padding: 1rem; display: flex; flex-direction: column; gap: 0.7rem; border-top: 5px solid var(--coral); }
.profile-card.kind-business { border-top-color: var(--teal); }
.profile-card.kind-both { border-top-color: var(--brass); }
.profile-card-link { color: inherit; text-decoration: none; }
.profile-card-top { display: flex; gap: 0.8rem; align-items: center; }
.profile-card h3 { font-size: 1.35rem; }
.headline, .need, .match-note { color: var(--muted); }
.match-note { color: var(--teal); font-weight: 560; }
.meta, .meta-list { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; color: var(--muted); font-size: 0.92rem; list-style: none; padding: 0; margin: 0.4rem 0 0; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.tags li { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.85rem; }
.avatar, .avatar-fallback {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  display: inline-grid; place-items: center; background: var(--ink); color: #fffaf3; font-family: var(--serif); font-weight: 680;
}
.avatar-lg { width: 96px; height: 96px; font-size: 1.6rem; }
.avatar-sm { width: 36px; height: 36px; font-size: 0.85rem; }
.section-more { margin-top: 1.2rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps article { background: var(--paper-2); border-radius: var(--radius); padding: 1.2rem; border: 1px solid var(--line); }
.step-no { font-family: var(--serif); font-size: 2rem; color: var(--coral); margin: 0; }

.filters { background: var(--paper-2); padding: 1rem; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 1.2rem; }
.filters .field { flex: 1 1 160px; }
.dir-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.2rem; align-items: start; }
.suggest-panel, .panel { padding: 1rem 1.1rem; }
.suggest-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.suggest-list a { display: grid; text-decoration: none; }
.suggest-list span { color: var(--muted); font-size: 0.92rem; }
.result-count { color: var(--muted); }
.pager { display: flex; gap: 1rem; align-items: center; margin-top: 1rem; }

.profile-layout { display: grid; gap: 1.2rem; }
.profile-hero { display: flex; gap: 1rem; align-items: center; padding: 1.2rem; border-radius: var(--radius); background: var(--ink); color: #fffaf3; }
.profile-hero .lede, .profile-hero .meta-list { color: #d5e0db; }
.profile-hero .chip { background: rgba(255,250,243,0.12); color: #f0b59a; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.prose p:last-child { margin-bottom: 0; }

.stack-form, .form-grid { display: grid; gap: 0.9rem; }
.form-grid { grid-template-columns: 1fr 1fr; }
.field-wide { grid-column: 1 / -1; }
.field label, .choice-set legend, .invite-form label { display: block; font-weight: 680; margin-bottom: 0.3rem; }
.choice-set { border: 0; padding: 0; margin: 0; }
.choices { display: grid; gap: 0.6rem; }
.choice { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; padding: 0.8rem; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper-2); }
.choice:has(input:checked) { border-color: var(--coral); background: var(--coral-soft); }
.choice small { display: block; color: var(--muted); }
.field-error { color: var(--err); margin: 0.3rem 0 0; font-weight: 560; }
.banner { padding: 0.8rem 1rem; border-radius: 12px; margin: 1rem 0; }
.banner-ok { background: var(--teal-soft); color: var(--teal); }
.banner-err { background: #fde8ee; color: var(--err); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.people-list, .tasks, .messages { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.8rem; }
.people-list li, .tasks li {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; justify-content: space-between;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 14px; padding: 0.8rem 1rem;
}
.people-list form { margin: 0; }
.tank-card { display: block; padding: 1rem 1.1rem; color: inherit; text-decoration: none; }
.tank-card:hover h2 { color: var(--coral); }
.tank-layout { display: grid; grid-template-columns: 1.35fr 0.75fr; gap: 1rem; align-items: start; }
.member-row { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; list-style: none; padding: 0; }
.member-row li { display: flex; align-items: center; gap: 0.45rem; }
.messages li { padding-bottom: 0.8rem; border-bottom: 1px solid var(--line); }
.message-meta { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.3rem; }
.message-meta time { color: var(--muted); font-size: 0.85rem; }
.messages li.mine { border-left: 4px solid var(--teal); padding-left: 0.8rem; }
.tasks li.done span { text-decoration: line-through; color: var(--muted); }
.empty { padding: 1.4rem; }
.empty-compact { box-shadow: none; }
.auth-card { padding: 1.5rem; }

.site-footer { background: var(--ink); color: #d7e2dd; padding: 2.2rem 0; margin-top: 2rem; }
.site-footer a { color: #f0b59a; }
.footer-name { font-family: var(--serif); color: #fffaf3; font-size: 1.3rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; }
.copyright { width: 100%; color: #b7c6c0; }

@media (max-width: 860px) {
  .hero-grid, .dir-layout, .split, .steps, .tank-layout, .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 2.6rem 0 2rem; }
  .profile-hero { align-items: flex-start; }
  .field-wide { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
