/* ---- Satixfied News — editorial theme ---------------------------------- */
:root {
  --bg: #f6f4ef;
  --bg-card: #fffdf9;
  --ink: #1a1712;
  --ink-soft: #5c554a;
  --ink-faint: #8b8375;
  --line: #e4ded2;
  --accent: #b23b2e;
  --accent-soft: #f0e6d8;
  --shadow: 0 1px 2px rgba(30, 24, 12, .04), 0 8px 24px rgba(30, 24, 12, .05);
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14130f;
    --bg-card: #1d1b16;
    --ink: #ece7dd;
    --ink-soft: #b3aa99;
    --ink-faint: #7d7565;
    --line: #2c2921;
    --accent: #e07a5f;
    --accent-soft: #2a221b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  font-size: 17px;
}
.wrap { max-width: 940px; margin: 0 auto; padding: 0 22px 64px; }
a { color: inherit; }

/* ---- Masthead ---------------------------------------------------------- */
.masthead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 40px 0 22px; margin-bottom: 26px;
  border-bottom: 2px solid var(--ink);
}
.mast-title {
  font-family: "Fraunces", Georgia, serif; font-weight: 700;
  font-size: clamp(30px, 6vw, 46px); letter-spacing: -.02em;
  text-decoration: none; color: var(--ink); line-height: 1;
}
.mast-tag { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }
.mast-nav { display: flex; gap: 18px; padding-bottom: 6px; }
.mast-nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 500;
  font-size: 14px; text-transform: uppercase; letter-spacing: .06em;
  transition: color .15s;
}
.mast-nav a:hover { color: var(--accent); }

/* ---- Edition bar ------------------------------------------------------- */
.edition-bar {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink-faint); font-size: 14px; margin-bottom: 34px;
  text-transform: uppercase; letter-spacing: .05em;
}
.edition-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.mast-nav a.on { color: var(--accent); font-weight: 600; }

/* ---- Search ------------------------------------------------------------ */
.searchbar { display: flex; gap: 10px; margin: 0 0 18px; }
.searchbar input[type="search"] {
  flex: 1; min-width: 0; padding: 13px 16px; font-size: 16px;
  border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg-card); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.searchbar input[type="search"]:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.searchbar button {
  padding: 13px 22px; border: none; border-radius: 11px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
  transition: filter .15s;
}
.searchbar button:hover { filter: brightness(1.07); }

mark {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  color: inherit; border-radius: 3px; padding: 0 2px;
}

.hitlist { list-style: none; margin: 0; padding: 0; }
.hit { padding: 16px 0; border-bottom: 1px solid var(--line); }
.hit:last-child { border-bottom: none; }
.hit-title {
  font-family: "Fraunces", serif; font-size: 18px; font-weight: 600;
  line-height: 1.32; text-decoration: none; color: var(--ink);
}
.hit-title:hover { color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; }
.hit-snip { margin: 7px 0 8px; color: var(--ink-soft); font-size: 14.5px;
  line-height: 1.55; }
.hit-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  color: var(--ink-faint); font-size: 12px;
  text-transform: uppercase; letter-spacing: .05em;
}

/* ---- Filter bar -------------------------------------------------------- */
.filters {
  display: flex; flex-direction: column; gap: 10px;
  margin: 0 0 30px; padding: 16px 18px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.filter-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.filter-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-faint); font-weight: 600; min-width: 44px;
}
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  display: inline-block; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg);
  color: var(--ink-soft); text-decoration: none;
  font-size: 13.5px; font-weight: 500; letter-spacing: .01em;
  transition: all .15s ease;
}
.chip:hover {
  border-color: var(--accent); color: var(--accent);
  transform: translateY(-1px);
}
.chip.on {
  background: var(--accent); border-color: var(--accent);
  color: #fff; font-weight: 600;
}
.chip.on:hover { color: #fff; filter: brightness(1.06); }

.result-note {
  color: var(--ink-faint); font-size: 12.5px; margin: 0 0 26px;
  text-transform: uppercase; letter-spacing: .06em;
}

/* ---- Highlights strip -------------------------------------------------- */
.highlights { margin: 0 0 40px; }
.hl-head { color: var(--ink); }
.hl-head::after { background: var(--ink); opacity: .25; }
.hl-strip {
  display: grid; gap: 2px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
@media (min-width: 860px) {
  .hl-strip { grid-template-columns: repeat(5, 1fr); }
}
.hl-item {
  display: flex; gap: 11px; padding: 17px 15px; text-decoration: none;
  background: var(--bg-card); transition: background .15s;
}
.hl-item:hover { background: var(--accent-soft); }
.hl-num {
  font-family: "Fraunces", serif; font-size: 13px; font-weight: 700;
  color: var(--accent); line-height: 1.5; flex-shrink: 0;
}
.hl-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.hl-topic {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); font-weight: 600;
}
.hl-headline {
  font-family: "Fraunces", serif; font-size: 15.5px; font-weight: 600;
  line-height: 1.32; color: var(--ink); letter-spacing: -.005em;
}
.hl-item:hover .hl-headline { color: var(--accent); }
.hl-why { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }

/* ---- Topic sections ---------------------------------------------------- */
.topic { margin: 0 0 46px; }
.topic-head {
  font-family: "Fraunces", serif; font-weight: 600; font-size: 15px;
  text-transform: uppercase; letter-spacing: .14em; color: var(--accent);
  margin: 0 0 18px; display: flex; align-items: center; gap: 14px;
}
.topic-head::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.topic-only {
  font-size: 11px; letter-spacing: .08em; color: var(--ink-faint);
  text-decoration: none; font-family: "Inter", sans-serif; font-weight: 500;
  white-space: nowrap; transition: color .15s;
}
.topic-only:hover { color: var(--accent); }
.card-topic {
  align-self: flex-start; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-faint); font-weight: 600;
  text-decoration: none; margin-bottom: 8px;
}
.card-topic:hover { color: var(--accent); }
.empty-actions { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }

.cards { display: grid; gap: 16px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: 0 2px 4px rgba(30,24,12,.06), 0 16px 36px rgba(30,24,12,.09);
}
.card-head {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: 21px; line-height: 1.28; letter-spacing: -.01em;
  margin: 0 0 10px;
}
.card-head a { text-decoration: none; }
.card-head a:hover { color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card-summary { margin: 0 0 14px; color: var(--ink-soft); font-size: 15.5px; }
.card-why {
  margin: 0 0 16px; font-size: 14.5px; color: var(--ink);
  background: var(--accent-soft); border-radius: 9px; padding: 10px 13px;
}
.why-label {
  display: block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); font-weight: 600; margin-bottom: 3px;
}
.card-meta {
  margin-top: auto; display: flex; align-items: center; gap: 7px;
  color: var(--ink-faint); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .04em;
}
.card-meta .src { font-weight: 600; color: var(--ink-soft); }
.card-meta .dot { opacity: .5; }

/* ---- Confidence & verification pills ----------------------------------- */
.card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 9px; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .07em; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap; cursor: default;
}
.pill.high     { background: color-mix(in srgb, #2e9e5b 16%, transparent); color: #2e9e5b;
                 border-color: color-mix(in srgb, #2e9e5b 32%, transparent); }
.pill.medium   { background: color-mix(in srgb, #c98a1b 16%, transparent); color: #c98a1b;
                 border-color: color-mix(in srgb, #c98a1b 32%, transparent); }
.pill.single   { background: var(--accent-soft); color: var(--ink-faint);
                 border-color: var(--line); }
.pill.verified { background: color-mix(in srgb, #2e9e5b 12%, transparent); color: #2e9e5b;
                 border-color: color-mix(in srgb, #2e9e5b 26%, transparent); }
.pill.unchecked{ background: var(--accent-soft); color: var(--accent);
                 border-color: color-mix(in srgb, var(--accent) 26%, transparent); }

.card.is-read { opacity: .62; }
.card.is-read:hover { opacity: 1; }
.card-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.inline { display: inline; margin: 0; }
.act {
  background: none; border: none; padding: 0; cursor: pointer; font: inherit;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-faint); text-decoration: none; transition: color .15s;
}
.act:hover { color: var(--accent); }
.act.save.on { color: var(--accent); font-weight: 600; }

/* ---- Story page -------------------------------------------------------- */
.story-head { margin-bottom: 30px; }
.story-title {
  font-family: "Fraunces", serif; font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(24px, 4.4vw, 34px); line-height: 1.2; margin: 8px 0 12px;
}
.story-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--ink-faint); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .05em; }
.story-block { margin-bottom: 40px; }
.cards.single { grid-template-columns: 1fr; }
.evidence-note { color: var(--ink-soft); font-size: 14px; margin: -6px 0 16px;
  max-width: 68ch; }

.claimlist { list-style: none; padding: 0; margin: 0; }
.claim { padding: 14px 0; border-bottom: 1px solid var(--line); }
.claim:last-child { border-bottom: none; }
.claim-row { display: flex; gap: 12px; align-items: flex-start; }
.verdict {
  flex-shrink: 0; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; margin-top: 2px;
}
.verdict.supported   { background: color-mix(in srgb, #2e9e5b 16%, transparent); color: #2e9e5b; }
.verdict.partial     { background: color-mix(in srgb, #c98a1b 16%, transparent); color: #c98a1b; }
.verdict.unsupported { background: color-mix(in srgb, #c0392b 16%, transparent); color: #c0392b; }
.verdict.unchecked   { background: var(--accent-soft); color: var(--ink-faint); }
.claim-text { font-size: 15px; line-height: 1.55; }
.evidence {
  margin: 10px 0 0 calc(12px + 5.5em); padding: 10px 14px;
  border-left: 3px solid var(--line); background: var(--bg-card);
  border-radius: 0 9px 9px 0; color: var(--ink-soft);
  font-size: 14px; line-height: 1.55; font-style: italic;
}
.evidence a { font-style: normal; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--accent); margin-left: 6px; }
.claim-note { margin: 8px 0 0 calc(12px + 5.5em); color: var(--ink-faint);
  font-size: 13px; }
@media (max-width: 620px) {
  .evidence, .claim-note { margin-left: 0; }
  .claim-row { flex-direction: column; gap: 6px; }
}

/* ---- Admin ------------------------------------------------------------- */
.statgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.stat {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 14px; text-align: center;
}
.stat-n { display: block; font-family: "Fraunces", serif; font-size: 24px;
  font-weight: 600; letter-spacing: -.02em; }
.stat-l { display: block; font-size: 11px; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .07em; margin-top: 4px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--bg-card); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 10px 14px; text-align: left;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th { font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-faint); font-weight: 600; }
.tbl tr:last-child td { border-bottom: none; }
.tbl td.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px; color: var(--ink-soft); white-space: normal; }
.muted { color: var(--ink-faint); }

/* ---- Badges ------------------------------------------------------------ */
.badge {
  display: inline-block; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 600;
  margin-left: 6px;
}
.badge.live { background: var(--accent); color: #fff; }

/* ---- Archive ----------------------------------------------------------- */
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list li { border-bottom: 1px solid var(--line); }
.archive-list a {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 16px 4px; text-decoration: none;
  transition: padding-left .15s, color .15s;
}
.archive-list a:hover { padding-left: 12px; color: var(--accent); }
.arc-date { font-family: "Fraunces", serif; font-size: 18px; }
.arc-meta { color: var(--ink-faint); font-size: 13px;
  text-transform: uppercase; letter-spacing: .04em; }

/* ---- Empty / footer ---------------------------------------------------- */
.empty { text-align: center; padding: 80px 0; color: var(--ink-soft); }
.empty h2 { font-family: "Fraunces", serif; margin: 0 0 8px; }
.foot {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--ink-faint); font-size: 12.5px;
}

/* ---- Chat -------------------------------------------------------------- */
.chat-layout { display: grid; gap: 22px; align-items: start; }
@media (min-width: 820px) { .chat-layout { grid-template-columns: 230px 1fr; } }

.chat-side { position: sticky; top: 18px; }
.newchat {
  width: 100%; padding: 11px 14px; border-radius: 11px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--ink);
  font-size: 14px; font-weight: 600; transition: all .15s;
}
.newchat:hover { border-color: var(--accent); color: var(--accent); }
.newchat.big { background: var(--accent); color: #fff; border-color: var(--accent);
  width: auto; padding: 13px 26px; margin-top: 6px; }
.newchat.big:hover { filter: brightness(1.07); color: #fff; }

.threadlist { list-style: none; padding: 0; margin: 14px 0 0; }
.threadlist li { border-radius: 9px; margin-bottom: 2px; }
.threadlist li.on { background: var(--accent-soft); }
.threadlist a {
  display: block; padding: 9px 11px; text-decoration: none; color: var(--ink-soft);
}
.threadlist li.on a { color: var(--accent); }
.threadlist a:hover { color: var(--accent); }
.th-title { display: block; font-size: 13.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-meta { display: block; font-size: 11px; color: var(--ink-faint);
  text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.th-empty { padding: 10px 11px; color: var(--ink-faint); font-size: 13px; }

.chat-intro { padding: 40px 0; }
.chat-intro h2 { font-family: "Fraunces", serif; margin: 0 0 10px; font-size: 26px; }
.chat-intro p { color: var(--ink-soft); max-width: 54ch; margin: 0 0 18px; }
.suggests { margin-top: 26px; display: flex; flex-direction: column; gap: 7px;
  color: var(--ink-faint); font-size: 14px; }
.suggests span { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.suggests em { color: var(--ink-soft); }

.chat-log { display: flex; flex-direction: column; gap: 16px; min-height: 200px;
  padding-bottom: 12px; }
.msg { display: flex; flex-direction: column; max-width: 88%; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.bot { align-self: flex-start; }
.bubble {
  padding: 13px 16px; border-radius: 14px; font-size: 15.5px; line-height: 1.6;
  border: 1px solid var(--line); background: var(--bg-card);
  overflow-wrap: anywhere;
}
.msg.user .bubble { background: var(--accent); color: #fff; border-color: var(--accent); }
.citemark {
  font-size: 10px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 4px; padding: 1px 4px;
  margin-left: 2px; vertical-align: super;
}
.cites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.cite {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-size: 12px; padding: 4px 10px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-card); color: var(--ink-soft);
  transition: all .15s;
}
.cite:hover { border-color: var(--accent); color: var(--accent); }
.cite.pending { opacity: .38; }
.cite-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: 10.5px;
  font-weight: 700; background: var(--accent-soft); color: var(--accent);
}
.typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint);
  animation: blink 1.3s infinite;
}
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.chat-input { display: flex; gap: 10px; margin-top: 8px;
  position: sticky; bottom: 12px; }
.chat-input input {
  flex: 1; min-width: 0; padding: 13px 16px; font-size: 15.5px;
  border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-card); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.chat-input input:focus { border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-input button {
  padding: 13px 24px; border: none; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: #fff; font-weight: 600; font-size: 15px;
}
.chat-input button:disabled { opacity: .5; cursor: default; }

/* ---- Login ------------------------------------------------------------- */
.login-shell {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow);
  padding: 44px 38px; width: 100%; max-width: 380px; text-align: center;
}
.brandmark { font-size: 40px; margin-bottom: 6px; }
.login-title {
  font-family: "Fraunces", serif; font-weight: 700; font-size: 30px;
  margin: 0 0 6px; letter-spacing: -.02em;
}
.login-tag { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 26px; }
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form input {
  padding: 13px 15px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.login-form button {
  padding: 13px; border-radius: 11px; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600;
  letter-spacing: .02em; transition: filter .15s, transform .05s;
}
.login-form button:hover { filter: brightness(1.06); }
.login-form button:active { transform: translateY(1px); }
.login-err { color: var(--accent); font-size: 14px; margin: 16px 0 0; }
