/* Calling Susan — simple, warm, readable. */

:root {
  --bg: #faf7f2;
  --ink: #2b2620;
  --muted: #6f655a;
  --accent: #b3541e;
  --accent-dark: #8f4217;
  --card: #ffffff;
  --line: #e8e0d4;
  --error: #b3261e;
  --success: #2e7d32;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.brand {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav a {
  margin-left: 1.25rem;
  color: var(--muted);
  text-decoration: none;
}

.site-header nav a:hover { color: var(--ink); }

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.hero { text-align: center; margin: 2rem 0 3rem; }
.hero h1 { font-size: 2.4rem; line-height: 1.25; margin-bottom: 1rem; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 1.5rem; }

.cta-row { display: flex; gap: 1rem; justify-content: center; }

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary:hover { background: #f3ece1; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.feature h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.feature p { color: var(--muted); margin: 0; }

.note {
  background: #f3ece1;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem;
}

.form-card { max-width: 480px; margin: 2rem auto; }
.form-card h1 { margin-top: 0; }

form label { display: block; margin-bottom: 1rem; font-weight: bold; }
form input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
form input:disabled { opacity: 0.6; }

.hint { font-weight: normal; color: var(--muted); font-size: 0.9rem; }
.muted { color: var(--muted); }
.error { color: var(--error); background: #fdecea; padding: 0.75rem 1rem; border-radius: 8px; }
.success { color: var(--success); background: #e8f5e9; padding: 0.75rem 1rem; border-radius: 8px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.grid .card h2 { margin-top: 0; font-size: 1.3rem; }
.grid .card h2 a { color: var(--ink); text-decoration: none; }

.pill {
  display: inline-block;
  background: #f3ece1;
  color: var(--muted);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.9rem;
}

/* Consent checkbox on signup */
.consent {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-weight: normal;
  background: #f3ece1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  cursor: pointer;
}
.consent input[type="checkbox"] {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.1rem 0 0;
  padding: 0;
  accent-color: var(--accent);
}

/* Big tap-to-call card on the dashboard */
.call-card { text-align: center; margin: 1.5rem 0 0.5rem; }
.call-card .muted { margin: 0 0 0.25rem; }
.call-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.call-number:hover { color: var(--accent-dark); }

/* Touch-friendly buttons */
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.8rem;
  -webkit-tap-highlight-color: transparent;
}
form input { font-size: 16px; } /* 16px+ prevents iOS auto-zoom on focus */

/* ---------------- mobile ---------------- */
@media (max-width: 640px) {
  body { font-size: 17px; }

  .site-header {
    padding: 0.8rem 1rem;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
  }
  .brand { font-size: 1.2rem; }
  .site-header nav a { margin-left: 0.9rem; }
  .site-header nav a.btn { padding: 0.5rem 1.1rem; min-height: 0; }

  .container { padding: 1.5rem 1rem 3rem; }

  .hero { margin: 1rem 0 2rem; }
  .hero h1 { font-size: 1.75rem; line-height: 1.3; }
  .lede { font-size: 1.05rem; }

  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { width: 100%; }

  .features { margin: 2rem 0; gap: 1.25rem; }

  .card { padding: 1.25rem; }
  .form-card { margin: 1rem auto; max-width: 100%; }

  .call-number { font-size: 1.6rem; }
  .grid { margin-top: 1.5rem; }
}

/* ---------------- admin panel (desktop-first) ---------------- */
.admin-wrap { max-width: 1100px; margin: 0 auto; }
.admin-wrap .card { margin-bottom: 1.75rem; }
.admin-wrap h2 { margin-top: 0; }
.table-scroll { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}
.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid #e8e0d5;
  white-space: nowrap;
}
.admin-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8a7a63;
  border-bottom: 2px solid #e8e0d5;
}
.admin-table tbody tr:nth-child(even) { background: #faf6ef; }
.admin-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.prompt-editor {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  width: 100%;
}

.footer-admin { font-size: 0.8rem; }
.footer-admin a { color: #a08e73; text-decoration: none; }
.footer-admin a:hover { text-decoration: underline; }

/* ---------------- profiles & billing ---------------- */
.list { list-style: none; padding: 0; margin: 0 0 1rem; }
.list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid #e8e0d5;
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
}
.inline-form { display: inline; margin: 0; }
.link-btn {
  background: none; border: none; padding: 0;
  color: #b06a3b; cursor: pointer; font-size: 0.9rem;
  text-decoration: underline; font-family: inherit;
}
.link-btn.danger { color: #a33f2e; }
.inline-add { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }
.inline-add input { flex: 1; min-width: 140px; }
.profile-row {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0; border-bottom: 1px solid #e8e0d5; flex-wrap: wrap;
}
.row-actions { display: flex; gap: 0.75rem; align-items: flex-start; }
.notes { margin: 0.35rem 0 0; font-size: 0.9rem; }
.stacked-form { margin-top: 1rem; max-width: 560px; }
.form-row { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.usage-row { display: flex; gap: 2.5rem; margin: 0.5rem 0 1rem; }
.usage-stat { display: flex; flex-direction: column; }
.usage-num { font-size: 2rem; font-weight: 700; color: #3d3226; }
