/* thingsmyagentsaid.ai — playful/illustrated palette */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,800&family=Inter:wght@400;500;600&display=swap');

:root {
  --cream: #FAF6EE;
  --cream-deep: #F2EBD8;
  --ink: #1A2333;
  --ink-soft: #4A5468;
  --mustard: #E6B547;
  --mustard-deep: #C99633;
  --coral: #D97757;
  --coral-deep: #BC5E40;
  --gray: #9B9489;
  --gray-soft: #C9C2B5;
  --green: #6B8F71;
  --shadow: rgba(26, 35, 51, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--coral-deep); text-decoration: none; }
a:hover { color: var(--coral); }

/* ── Header ────────────────────────────────────────────── */

.header {
  border-bottom: 1px solid var(--cream-deep);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 38px; height: 38px;
  background: var(--mustard);
  border-radius: 50% 50% 50% 6px;
  position: relative;
  flex-shrink: 0;
}
.logo-mark::before {
  content: '';
  position: absolute;
  width: 6px; height: 6px;
  background: var(--ink);
  border-radius: 50%;
  top: 14px; left: 11px;
  box-shadow: 14px 0 0 var(--ink);
}

.logo-text {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.logo-text .dot { color: var(--coral); }
.logo-text .tld { color: var(--gray); font-weight: 600; font-size: 16px; }

.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--ink-soft); font-weight: 500; font-size: 15px; }
.nav a:hover { color: var(--ink); }

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}
.btn:hover { background: var(--coral-deep); color: var(--cream); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--cream); }

/* ── Hero ──────────────────────────────────────────────── */

.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: 80px 32px 60px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  background: var(--mustard);
  color: var(--ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 64px;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}
.hero-title .accent { color: var(--coral); font-style: italic; font-weight: 400; }

.hero-sub {
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Hero illustration: a quote card mock */
.hero-card {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 8px 8px 0 var(--mustard);
  transform: rotate(-1.5deg);
  position: relative;
}
.hero-card::before {
  content: '';
  position: absolute;
  width: 56px; height: 56px;
  top: -28px; right: -20px;
  background: var(--coral);
  border-radius: 50%;
  border: 2px solid var(--ink);
  z-index: -1;
}
.hero-card-quote {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-card-quote::before { content: '"'; color: var(--coral); font-size: 48px; font-weight: 800; line-height: 0; vertical-align: -10px; margin-right: 4px; }
.hero-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
  font-weight: 500;
}
.hero-card-meta strong { color: var(--ink); }
.dot-divider { color: var(--gray-soft); }

/* ── Feed section ──────────────────────────────────────── */

.feed-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 32px 100px;
}

.feed-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 36px;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 12px;
}

.feed-title {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.01em;
}

.feed-filter {
  display: flex;
  gap: 8px;
  font-size: 14px;
}
.feed-filter a {
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--ink-soft);
  font-weight: 500;
}
.feed-filter a.active {
  background: var(--ink);
  color: var(--cream);
}

.feed-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.quote-card {
  background: white;
  border: 1.5px solid var(--cream-deep);
  border-radius: 12px;
  padding: 28px;
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.quote-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.quote-card .mark {
  font-family: 'Fraunces', serif;
  font-size: 64px;
  font-weight: 800;
  color: var(--mustard);
  line-height: 0;
  position: absolute;
  top: 32px;
  left: 24px;
}

.quote-text {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 500;
  margin-left: 28px;
  margin-bottom: 16px;
  margin-top: 4px;
}

.quote-context {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-left: 28px;
  margin-bottom: 18px;
  font-style: italic;
}

.quote-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-left: 28px;
  font-size: 13px;
  color: var(--gray);
  border-top: 1px solid var(--cream-deep);
  padding-top: 14px;
}
.quote-attrib { font-weight: 500; }
.quote-attrib strong { color: var(--ink); font-weight: 600; }

.quote-actions { display: flex; gap: 14px; }
.icon-btn {
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.icon-btn:hover { color: var(--coral-deep); }

/* ── Submit page ──────────────────────────────────────── */

.page-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 32px 100px;
}

.page-title {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: 44px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.1;
}
.page-sub {
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 48px;
  line-height: 1.5;
}

.form-card {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 40px;
  box-shadow: 6px 6px 0 var(--coral);
}

.form-row { margin-bottom: 24px; }
.form-row:last-child { margin-bottom: 0; }

.form-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.form-label .optional {
  font-weight: 400;
  color: var(--gray);
  font-size: 13px;
  margin-left: 6px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-soft);
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  background: var(--cream);
  color: var(--ink);
  transition: border-color 0.15s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--coral);
  background: white;
}

.form-textarea { min-height: 100px; resize: vertical; font-family: 'Fraunces', serif; font-size: 18px; }

.form-help {
  font-size: 13px;
  color: var(--gray);
  margin-top: 6px;
  line-height: 1.4;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--cream-deep);
}
.form-status {
  font-size: 14px;
  color: var(--ink-soft);
  margin-left: auto;
}

/* ── Admin page ────────────────────────────────────────── */

.admin-banner {
  background: var(--ink);
  color: var(--cream);
  padding: 12px 32px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}
.admin-banner-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-banner .badge {
  background: var(--mustard);
  color: var(--ink);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.admin-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 32px 100px;
}

.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--cream-deep);
  margin-bottom: 32px;
}
.admin-tab {
  padding: 14px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.admin-tab.active {
  color: var(--ink);
  border-bottom-color: var(--coral);
}
.admin-tab .count {
  display: inline-block;
  background: var(--cream-deep);
  color: var(--ink-soft);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 6px;
}
.admin-tab.active .count {
  background: var(--coral);
  color: white;
}

.admin-row {
  background: white;
  border: 1.5px solid var(--cream-deep);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.admin-row-content {
  min-width: 0;
}
.admin-row-quote {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 500;
  margin-bottom: 8px;
}
.admin-row-meta {
  font-size: 13px;
  color: var(--gray);
  display: flex;
  gap: 12px;
  align-items: center;
}
.admin-row-meta strong { color: var(--ink-soft); font-weight: 600; }

.admin-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.btn-sm {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid;
  cursor: pointer;
  font-family: inherit;
}
.btn-approve { background: var(--green); color: white; border-color: var(--green); }
.btn-approve:hover { background: #547259; border-color: #547259; }
.btn-reject { background: white; color: var(--ink-soft); border-color: var(--gray-soft); }
.btn-reject:hover { background: var(--cream-deep); color: var(--ink); }

/* ── Footer ────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--cream-deep);
  padding: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--gray);
}
.footer a { color: var(--ink-soft); }

/* ── Live-only additions: alerts, empty state, pagination, prose, status ───── */

.alert {
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
  border: 1.5px solid;
}
.alert strong { font-weight: 700; display: block; margin-bottom: 6px; }
.alert p { color: inherit; margin-bottom: 12px; }
.alert ul { margin: 8px 0 0 20px; }
.alert ul li { margin-bottom: 4px; }
.alert-success {
  background: #EAF4EC;
  border-color: var(--green);
  color: #2E4F35;
}
.alert-error {
  background: #FBE9E2;
  border-color: var(--coral-deep);
  color: #6E2D17;
}

.empty-state {
  background: white;
  border: 1.5px dashed var(--gray-soft);
  border-radius: 12px;
  padding: 60px 32px;
  text-align: center;
  color: var(--ink-soft);
}
.empty-state p { margin-bottom: 16px; font-size: 17px; }

.pagination {
  margin-top: 40px;
  text-align: center;
}

.feed-count {
  font-size: 14px;
  color: var(--gray);
  font-weight: 500;
}

.admin-tab { text-decoration: none; }
.admin-tab:hover { color: var(--ink); }

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.status-pending { background: var(--mustard); color: var(--ink); }
.status-approved { background: var(--green); color: white; }
.status-rejected { background: var(--cream-deep); color: var(--gray); }

.prose h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 8px;
  color: var(--ink);
}
.prose h3:first-child { margin-top: 0; }
.prose p {
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--ink-soft);
}
.prose em { color: var(--coral-deep); font-style: italic; font-weight: 500; }

.nav a.active { color: var(--ink); font-weight: 600; }

@media (max-width: 768px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px; }
  .hero-title { font-size: 44px; }
  .feed-grid { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr; }
  .admin-actions { justify-content: flex-end; }
  .header-inner { padding: 16px 24px; }
  .nav { gap: 16px; }
  .nav a:not(.btn) { display: none; }
}

.provider-tag {
  display: inline-block;
  padding: 1px 8px;
  background: var(--cream-deep);
  color: var(--ink-soft);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 4px;
  letter-spacing: 0.01em;
}

/* fix: .btn in nav was inheriting .nav a color override */
.nav a.btn { color: var(--cream); }
.nav a.btn:hover { color: var(--cream); }

/* Short textarea for context field */
.form-textarea-short {
  min-height: 60px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
}

/* Delete button — louder than reject */
.btn-delete { background: var(--coral-deep); color: white; border-color: var(--coral-deep); }
.btn-delete:hover { background: #8E3F26; border-color: #8E3F26; }
