/* WeaponsStack design system — one font, one button, one form, one card.
   Tokens from the Informed Buyer Guide / pre-listing v4 system Micah
   approved Nov 6, 2026: restrained, whitespace heavy, professional.
   Blue #0E84C7, warm black #171310, dark text #1D2228, grey text
   #6C737C, card grey #EEF1F3, light blue wash #E8F2F9. */
:root {
  --blue: #0E84C7;
  --blue-dark: #0B5C85;
  --blue-hover: #0B6FA6;
  --ink: #171310;
  --text: #1D2228;
  --grey: #6C737C;
  --card-grey: #EEF1F3;
  --wash: #E8F2F9;
  --line: #E2E7EB;
  --field-line: #C7D0D7;
  --red: #B3261E;
  --red-bg: #FDECEA;
  --amber-bg: #FDF0CD;
  --amber-line: #B58900;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
       Roboto, Helvetica, Arial, sans-serif; color: var(--text);
       background: #fff; line-height: 1.5; }
.topbar { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center;
          justify-content: space-between; padding: 0.85rem 1rem;
          background: var(--ink); color: #fff;
          border-bottom: 3px solid var(--blue); }
.topbar a { color: #fff; text-decoration: none; }
.topbar .brand { font-weight: 700; font-size: 1.08rem; letter-spacing: 0.01em;
                 display: inline-flex; align-items: center; gap: 0.55rem; }
.brand-mark { display: inline-block; width: 11px; height: 11px;
              background: var(--blue); border-radius: 2px; }
.topbar nav a { margin-left: 0.9rem; font-size: 0.95rem; color: #D8DEE3; }
.topbar nav a:hover { color: #fff; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 2.5rem; }
.footbar { background: var(--ink); color: #fff; padding: 1.1rem 1rem;
           display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem;
           align-items: baseline; justify-content: space-between; }
.foot-brand { font-weight: 700; }
.foot-note { color: #AEB8BF; font-size: 0.9rem; }
.kicker { color: var(--blue); font-size: 0.78rem; font-weight: 700;
          letter-spacing: 0.14em; text-transform: uppercase;
          margin: 0 0 0.35rem; }
.section-kicker { margin-top: 2.2rem; }
.section-title { margin-top: 0; }
h1 { font-size: 1.5rem; margin: 0.5rem 0; color: var(--ink); }
h1.page-title { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em;
                margin: 0.1rem 0 0.7rem; }
h2 { font-size: 1.18rem; margin: 0.25rem 0 0.6rem; color: var(--ink); }
.lede { font-size: 1.05rem; color: var(--grey); line-height: 1.6;
        max-width: 38rem; }
.card { background: #fff; border: 1px solid var(--line);
        border-top: 3px solid var(--blue); border-radius: 12px;
        padding: 1.25rem; margin: 1.1rem 0;
        box-shadow: 0 1px 2px rgba(23, 19, 16, 0.04); }
.module-card .kicker { margin-bottom: 0.2rem; }
.empty { color: var(--grey); margin: 0.4rem 0 0.2rem; }
label { display: block; margin: 0.8rem 0; font-weight: 600; color: var(--ink);
        font-size: 0.95rem; }
input, select, textarea { display: block; width: 100%; margin-top: 0.35rem;
  padding: 0.7rem 0.8rem; font-size: 1rem; border: 1px solid var(--field-line);
  border-radius: 8px; font-weight: 400; background: #fff; color: var(--text);
  font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none;
  border-color: var(--blue); box-shadow: 0 0 0 3px var(--wash); }
button, .button { display: inline-block; background: var(--blue); color: #fff;
  border: 0; border-radius: 8px; padding: 0.75rem 1.15rem; font-size: 1rem;
  font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none; min-height: 44px; }
button:hover, .button:hover { background: var(--blue-hover); }
button.approve { background: var(--ink); font-weight: 700; }
button.approve:hover { background: #000; }
.button-ghost { display: inline-block; color: var(--blue-dark);
  padding: 0.75rem 0.4rem; font-size: 1rem; font-weight: 600;
  text-decoration: none; min-height: 44px; }
.flash { background: var(--wash); border: 1px solid var(--blue);
         border-radius: 8px; padding: 0.8rem 1rem; margin: 1rem 0; }
.sysnote { background: var(--amber-bg); border: 1px solid var(--amber-line);
           border-radius: 8px; padding: 0.7rem 1rem; margin: 1rem 0;
           font-size: 0.95rem; }
.error { background: var(--red-bg); border: 1px solid var(--red);
         border-radius: 8px; padding: 0.7rem 1rem; margin: 1rem 0; }
.error-text { color: var(--red); font-size: 0.9rem; }
.note { color: var(--grey); font-size: 0.95rem; }
.meta { color: var(--grey); }
.eval-list { list-style: none; padding: 0; margin: 0.6rem 0 0.2rem; }
.eval-list li { background: #fff; border: 1px solid var(--line);
                border-radius: 10px; margin: 0.6rem 0; }
.eval-list li:hover { border-color: var(--blue); }
.eval-list a { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem;
               align-items: baseline; padding: 0.9rem 1rem; color: inherit;
               text-decoration: none; }
.eval-list .addr { font-weight: 700; color: var(--ink); }
.status { font-size: 0.85rem; padding: 0.15rem 0.55rem; border-radius: 999px;
          background: var(--card-grey); color: #49525B; }
.status-analyzed, .status-approved { background: var(--wash);
          color: var(--blue-dark); }
.status-failed { background: #F6D5D2; color: #8C2B21; }
.status-awaiting_analysis_key { background: var(--amber-bg); }
.status-revising { background: var(--amber-bg); }
.kv { list-style: none; padding: 0; }
.kv li { margin: 0.4rem 0; }
.logo-preview { max-width: 200px; max-height: 80px; }
.correction { border-left: 3px solid var(--blue); padding-left: 0.7rem; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; }
.md td, .md th { border: 1px solid var(--line); padding: 0.3rem 0.5rem;
  font-size: 0.92rem; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: #fff; }
td, th { border: 1px solid var(--line); padding: 0.45rem 0.55rem;
         font-size: 0.92rem; text-align: left; }
code { background: var(--card-grey); padding: 0.1rem 0.3rem; border-radius: 4px; }
a { color: var(--blue-dark); }

/* --- Agent summary sections + versions --------------------------------- */
.summary-sections { margin-top: 0.4rem; }
.summary-section { padding: 0.7rem 0; border-top: 1px solid var(--line); }
.summary-section:first-child { border-top: 0; padding-top: 0.2rem; }
.summary-section h3 { margin: 0 0 0.35rem; font-size: 0.82rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.summary-section p { margin: 0.2rem 0; }
.summary-section ul { margin: 0.2rem 0; padding-left: 1.15rem; }
.summary-section li { margin: 0.3rem 0; }
.summary-value { background: var(--wash); border: 1px solid #C9E2F2;
  border-radius: 8px; padding: 0.8rem 0.9rem; margin-bottom: 0.4rem; }
.summary-value h3 { color: var(--blue-dark); }
.summary-value p { font-size: 1.18rem; font-weight: 600;
  line-height: 1.45; }
.version-line { border-top: 1px solid var(--line); padding: 0.6rem 0;
  margin: 0; }
.version-line:first-of-type { border-top: 0; }

/* --- Feedback pop-up + admin inbox ------------------------------------- */
.feedback-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 40;
  border-radius: 999px; box-shadow: 0 4px 14px rgba(23,19,16,0.25);
  padding: 0.7rem 1.2rem; }
.feedback-backdrop { position: fixed; inset: 0; z-index: 50;
  background: rgba(23, 19, 16, 0.55); display: flex; align-items: flex-end;
  justify-content: center; }
.feedback-backdrop[hidden] { display: none; }
.feedback-dialog { background: #fff; width: 100%; max-width: 34rem;
  max-height: 92vh; overflow-y: auto; border-radius: 14px 14px 0 0;
  padding: 1.1rem; position: relative; }
@media (min-width: 40rem) {
  .feedback-backdrop { align-items: center; }
  .feedback-dialog { border-radius: 14px; }
}
.feedback-close { position: absolute; top: 0.4rem; right: 0.6rem;
  background: none; color: #444; font-size: 1.6rem; line-height: 1;
  padding: 0.4rem 0.6rem; min-height: 44px; }
.feedback-close:hover { background: none; }
.tl-backdrop { position: fixed; inset: 0; z-index: 50;
  background: rgba(23, 19, 16, 0.55); display: flex; align-items: flex-end;
  justify-content: center; }
.tl-backdrop[hidden] { display: none; }
.tl-dialog { background: #fff; width: 100%; max-width: 34rem;
  max-height: 92vh; overflow-y: auto; border-radius: 14px 14px 0 0;
  padding: 1.1rem; position: relative; }
@media (min-width: 40rem) {
  .tl-backdrop { align-items: center; }
  .tl-dialog { border-radius: 14px; }
}
.tl-msg-block { border-top: 1px solid var(--line); padding: 0.7rem 0; }
.tl-msg-block:first-of-type { border-top: 0; }
.tl-msg { white-space: pre-wrap; font-size: 1.05rem; margin: 0.2rem 0; }
button:disabled { opacity: 0.5; }
.feedback-stars-field { border: 0; margin: 0.6rem 0 0; padding: 0; }
.feedback-stars-field legend { font-weight: 600; padding: 0; }
.feedback-stars { direction: rtl; unicode-bidi: bidi-override;
  text-align: left; font-size: 2rem; line-height: 1.2; }
.feedback-stars input { position: absolute; opacity: 0; width: 1px;
  height: 1px; }
.feedback-stars label { display: inline-block; margin: 0; padding: 0 0.15rem;
  color: #c9c9c9; cursor: pointer; font-weight: 400; }
.feedback-stars input:checked ~ label,
.feedback-stars label:hover, .feedback-stars label:hover ~ label { color: #f0a51f; }
.feedback-stars input:focus-visible + label { outline: 2px solid var(--blue); }
.feedback-check { display: flex; gap: 0.6rem; align-items: flex-start;
  font-weight: 400; }
.feedback-check input { width: auto; margin-top: 0.2rem; }
.badge { display: inline-block; background: var(--red); color: #fff;
  border-radius: 999px; padding: 0.2rem 0.65rem; font-size: 0.85rem;
  font-weight: 700; margin-left: 0.5rem; vertical-align: middle; }
.feedback-filter { display: flex; flex-wrap: wrap; gap: 0.6rem;
  align-items: flex-end; }
.feedback-filter label { flex: 1 1 12rem; margin: 0; }
.feedback-message { white-space: pre-wrap; overflow-wrap: anywhere;
  border-left: 3px solid var(--blue); padding-left: 0.7rem; }
.feedback-decision { border-top: 1px solid var(--line); margin-top: 0.8rem;
  padding-top: 0.4rem; }
.feedback-status-new { background: var(--amber-bg); }
.feedback-status-reviewed { background: var(--wash); }
.feedback-status-decided-implement { background: #DFF0E4; }
.feedback-status-decided-parked { background: var(--card-grey); }
.feedback-status-decided-declined { background: #F6D5D2; }

/* --- Roleplay Coach ------------------------------------------------------ */
.rp-pick { display: flex; gap: 0.6rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 0.8rem 1rem; font-weight: 400; }
.rp-pick input { width: auto; margin-top: 0.25rem; }
.rp-chat { margin: 1rem 0; }
.rp-line { max-width: 85%; padding: 0.6rem 0.8rem; border-radius: 12px;
  margin: 0.45rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rp-contact { background: #fff; border: 1px solid var(--line); margin-right: auto; }
.rp-agent { background: var(--wash); margin-left: auto; }
.rp-who { display: block; font-size: 0.75rem; font-weight: 700;
  color: var(--blue-dark); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.2rem; }
.rp-event { text-align: center; color: var(--grey); font-size: 0.85rem;
  margin: 0.5rem 0; }
.rp-script { white-space: pre-wrap; font-size: 0.95rem; }
.rp-commands { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0; }
.rp-commands button { background: var(--ink); font-size: 0.92rem;
  padding: 0.6rem 0.9rem; min-height: 40px; }
.rp-commands button.approve { background: var(--blue); font-weight: 700; }
.rp-voice { text-align: center; }
.rp-big-btn { display: block; width: 100%; max-width: 420px; margin: 0.4rem auto;
  min-height: 76px; font-size: 1.35rem; font-weight: 700; border-radius: 999px;
  background: var(--blue-dark); color: #fff; }
.rp-big-btn.rp-recording { background: var(--red); }
.rp-talk-btn { min-height: 48px; font-size: 1rem; }
.rp-status { font-size: 1.05rem; margin: 0.7rem auto 0.3rem; max-width: 520px; }
.rp-note { color: var(--blue-dark); font-weight: 600; min-height: 1.2em; }
.rp-type { margin: 1rem 0; }
.rp-type summary { cursor: pointer; color: var(--grey); font-size: 0.95rem; }

/* Previous reports folders on the dashboard: past runs tucked behind
   one tap so the module cards stay clean (Micah, Nov 6, 2026). */
.prev-reports { margin-top: 0.3rem; }
.prev-reports summary { cursor: pointer; list-style: none;
  font-weight: 600; color: var(--blue-dark); padding: 0.45rem 0; }
.prev-reports summary::-webkit-details-marker { display: none; }
.prev-reports summary::after { content: " \25B8"; color: var(--blue); }
.prev-reports[open ] summary::after { content: " \25BE"; }

/* Competitor Research module */
.internal-mark { display: inline-block; background: #FEE2E2; color: #991B1B;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 3px 8px; border-radius: 99px; text-transform: uppercase; }
.off-mark { display: inline-block; background: var(--card-grey); color: var(--grey);
  font-size: 11px; font-weight: 700; padding: 3px 8px;
  border-radius: 99px; text-transform: uppercase; margin-left: 0.4rem; }
.cr-table { min-width: 560px; }
.cr-table th { background: var(--card-grey); font-size: 12px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey); }
.cr-sub { text-transform: none; letter-spacing: 0; font-weight: 400;
  color: var(--grey); font-size: 12px; }
.cr-src { display: block; color: var(--grey); font-size: 11.5px;
  margin-top: 2px; }
.cr-flagged { background: #FFFBEB; }
.badge { display: inline-block; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.05em; padding: 2px 7px; border-radius: 99px;
  text-transform: uppercase; }
.b-ok { background: #DCFCE7; color: #15803D; }
.b-agent { background: #DCFCE7; color: #15803D; }
.b-claim { background: var(--wash); color: var(--blue-dark); }
.b-flag { background: #FEF3C7; color: #B45309; }
.cr-list li { margin: 0.45rem 0; }
.cr-how { display: block; color: var(--grey); font-size: 13px; }
.cr-talk { font-size: 15px; margin: 0; }
.cr-fact { border-top: 1px solid var(--line); padding-top: 0.6rem;
  margin-top: 0.6rem; }
.cr-source { font-weight: 400; font-size: 13px; color: var(--grey); }
.cr-backdrop { position: fixed; inset: 0; background: rgba(23,19,16,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 18px; z-index: 60; }
.cr-backdrop[hidden ] { display: none; }
.cr-dialog { background: #fff; border-radius: 12px; max-width: 520px;
  width: 100%; padding: 22px; max-height: 88vh; overflow-y: auto; }
.cr-warn { font-size: 13px; background: #FEF3C7; border-radius: 8px;
  padding: 10px 12px; margin: 10px 0; }
.cr-note { font-size: 13px; background: var(--wash); border-radius: 8px;
  padding: 10px 12px; margin: 10px 0; }

/* Full brief tucked behind a tap on the review page */
details.brief-details summary { cursor: pointer; list-style: none; }
details.brief-details summary::-webkit-details-marker { display: none; }
details.brief-details summary h2 { display: inline; }
details.brief-details summary .note { display: block; margin-top: 0.25rem; }
details.brief-details summary::after { content: "Tap to open \25B8"; display: block; font-size: 0.85rem; color: var(--blue); margin-top: 0.35rem; }
details.brief-details[open ] summary::after { content: "Tap to close \25BE"; }
