/* MentionRadar — deep slate + teal. Display: Fraunces. UI: Public Sans. */

:root {
  --ink: #14202e;
  --ink-soft: #4a5b6d;
  --paper: #ffffff;
  --surface: #eef1f4;
  --surface-2: #f7f9fa;
  --line: #d6dce2;
  --signal: #0e6e78;
  --signal-deep: #0a545c;
  --signal-wash: #e2f0f1;
  --flag: #a8321e;
  --good: #2f6b4f;
  --amber: #8a6414;

  --measure: 62ch;
  --radius-s: 3px;
  --radius-m: 6px;
  --shadow: 0 1px 0 var(--line);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, .display {
  font-family: Fraunces, "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  font-variation-settings: "SOFT" 20, "WONK" 1;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1rem; max-width: var(--measure); }

a { color: var(--signal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--radius-s);
}

.wrap { width: min(1120px, 100% - 3rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 3rem); margin-inline: auto; }

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.masthead .wrap {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 66px; flex-wrap: wrap;
}
.brand {
  font-family: Fraunces, Georgia, serif;
  font-weight: 600; font-size: 1.3rem; color: var(--ink);
  text-decoration: none; display: inline-flex; align-items: center; gap: 0.55rem;
}
.brand svg { display: block; }
.masthead nav { margin-left: auto; display: flex; align-items: center; gap: 1.4rem; }
.masthead nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.95rem; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 0.97rem;
  padding: 0.68rem 1.25rem; border-radius: var(--radius-m);
  border: 1px solid var(--signal-deep); background: var(--signal-deep);
  color: #fff; text-decoration: none; cursor: pointer;
  transition: background 120ms ease;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--signal-deep); }
.btn.ghost:hover { background: var(--signal-wash); color: var(--signal-deep); border-color: var(--signal-deep); }
.btn.quiet {
  background: transparent; border-color: var(--line); color: var(--ink-soft);
  padding: 0.4rem 0.7rem; font-size: 0.86rem; font-weight: 500;
}
.btn.quiet:hover { background: var(--surface); color: var(--ink); border-color: var(--ink-soft); }
.btn.small { padding: 0.45rem 0.85rem; font-size: 0.88rem; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- hero ---------- */

.hero { padding: 4.5rem 0 3.5rem; border-bottom: 1px solid var(--line); }
.hero .wrap {
  display: grid; gap: 3.5rem;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: start;
}
.hero p.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34ch; }
.hero-actions { display: flex; gap: 0.9rem; align-items: center; flex-wrap: wrap; margin-top: 1.8rem; }
.hero-actions .note { font-size: 0.9rem; color: var(--ink-soft); }

.feed-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 0.9rem;
}
.feed-frame .feed-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 0.87rem; color: var(--ink-soft); padding: 0.15rem 0.35rem 0.75rem;
}

/* ---------- mention card ---------- */

.mention {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
}
.mention:last-child { margin-bottom: 0; }
.mention[data-tone="negative"] { border-left-color: var(--flag); }
.mention[data-tone="positive"] { border-left-color: var(--good); }
.mention[data-tone="neutral"] { border-left-color: var(--ink-soft); }
.mention .meta {
  display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap;
  font-size: 0.83rem; color: var(--ink-soft); margin-bottom: 0.3rem;
}
.mention .src { font-weight: 600; color: var(--ink); }
.mention .title { font-size: 1rem; font-weight: 600; margin: 0 0 0.25rem; max-width: none; }
.mention .title a { color: var(--ink); text-decoration: none; }
.mention .title a:hover { text-decoration: underline; }
.mention .snippet { font-size: 0.92rem; color: var(--ink-soft); margin: 0; max-width: none; }
.mention .row { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.mention.unread { background: var(--surface-2); }

.tone {
  font-size: 0.78rem; font-weight: 600; padding: 0.05rem 0.45rem;
  border-radius: 999px; border: 1px solid currentColor;
}
.tone[data-tone="negative"] { color: var(--flag); }
.tone[data-tone="positive"] { color: var(--good); }
.tone[data-tone="neutral"] { color: var(--ink-soft); }

/* one orchestrated arrival, on load only */
.feed-frame .mention { opacity: 0; transform: translateY(10px); animation: land 520ms ease forwards; }
.feed-frame .mention:nth-child(2) { animation-delay: 120ms; }
.feed-frame .mention:nth-child(3) { animation-delay: 260ms; }
.feed-frame .mention:nth-child(4) { animation-delay: 400ms; }
@keyframes land { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .feed-frame .mention { animation: none; opacity: 1; transform: none; }
}

/* ---------- sections ---------- */

section.band { padding: 4rem 0; border-bottom: 1px solid var(--line); }
section.band.tint { background: var(--surface-2); }
.section-intro { max-width: var(--measure); margin-bottom: 2.5rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2rem;
         grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: block;
  font-family: Fraunces, Georgia, serif; font-size: 1.6rem; color: var(--signal);
  border-top: 2px solid var(--signal); padding-top: 0.4rem; width: 2ch; margin-bottom: 0.6rem;
}
.steps h3 { margin-bottom: 0.3rem; }
.steps p { font-size: 0.96rem; color: var(--ink-soft); margin: 0; }

.sources { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.sources li {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.85rem;
  font-size: 0.9rem; color: var(--ink-soft); background: var(--paper);
}

/* ---------- pricing ---------- */

.tiers { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tier {
  border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 1.6rem; background: var(--paper); display: flex; flex-direction: column;
}
.tier.featured { border-color: var(--signal); border-width: 2px; }
.tier .name { font-family: Fraunces, Georgia, serif; font-size: 1.35rem; font-weight: 600; }
.tier .price { font-size: 2.1rem; font-family: Fraunces, Georgia, serif; margin: 0.3rem 0 0; }
.tier .price span { font-family: "Public Sans", sans-serif; font-size: 0.92rem; color: var(--ink-soft); font-weight: 400; }
.tier .blurb { font-size: 0.95rem; color: var(--ink-soft); margin: 0.7rem 0 1.1rem; }
.tier ul { list-style: none; padding: 0; margin: 0 0 1.5rem; font-size: 0.95rem; }
.tier li { padding: 0.32rem 0; border-bottom: 1px solid var(--surface); }
.tier li.off { color: var(--ink-soft); }
.tier .btn { margin-top: auto; text-align: center; }

/* ---------- forms ---------- */

form.stack { display: grid; gap: 1.1rem; max-width: 30rem; }
label { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 0.3rem; }
label .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: 0.86rem; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; font: inherit; font-size: 0.97rem; padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: var(--radius-m);
  background: var(--paper); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--signal); }
.checkline { display: flex; gap: 0.6rem; align-items: flex-start; }
.checkline label { font-weight: 400; margin: 0; }

.flash { border-radius: var(--radius-m); padding: 0.7rem 1rem; margin-bottom: 1rem; font-size: 0.95rem; }
.flash.ok { background: var(--signal-wash); border: 1px solid var(--signal); }
.flash.error { background: #fbeceb; border: 1px solid var(--flag); color: #6d1f12; }

/* ---------- dashboard ---------- */

.dash { padding: 2.2rem 0 4rem; }
.dash-head { display: flex; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.dash-head h1 { font-size: 2rem; margin: 0; }
.dash-head .spacer { margin-left: auto; }

.stats { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
         background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-m);
         overflow: hidden; margin-bottom: 1.8rem; }
.stat { background: var(--paper); padding: 0.9rem 1.1rem; }
.stat .n { font-family: Fraunces, Georgia, serif; font-size: 1.9rem; line-height: 1.1; }
.stat .k { font-size: 0.87rem; color: var(--ink-soft); }
.stat[data-alert="1"] .n { color: var(--flag); }

.toolbar { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.2rem; }
.toolbar .sep { width: 1px; height: 20px; background: var(--line); margin: 0 0.3rem; }
.chip {
  font-size: 0.88rem; padding: 0.35rem 0.75rem; border: 1px solid var(--line);
  border-radius: 999px; text-decoration: none; color: var(--ink-soft); background: var(--paper);
}
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.empty {
  border: 1px dashed var(--line); border-radius: var(--radius-m);
  padding: 2.5rem; text-align: left; background: var(--surface-2);
}
.empty h3 { margin-top: 0; }

.pager { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.5rem; font-size: 0.92rem; }

table.plain { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
table.plain th, table.plain td { text-align: left; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); }
table.plain th { font-size: 0.86rem; color: var(--ink-soft); font-weight: 600; }

.panel { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 1.4rem; background: var(--paper); margin-bottom: 1.5rem; }
.panel > h2 { font-size: 1.3rem; }

/* ---------- footer ---------- */

footer.foot { padding: 2.5rem 0 3.5rem; color: var(--ink-soft); font-size: 0.92rem; }
footer.foot .wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
footer.foot a { color: var(--ink-soft); }
footer.foot .spacer { margin-left: auto; }

@media (max-width: 860px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .wrap, .narrow { width: min(100% - 2rem, 1120px); }
  body { font-size: 16px; }
}
