/* RatePlug Commercial — deal / legal page styles (brand restyle)
   slate #283039 · sky #38b4dd · green #53dd6c · alt bg #f4f4f4 · lines #ebebeb/#d0d0d0
   Fonts: Roboto Condensed 700 (headings), Roboto 300/400 (body) */
@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&family=Roboto:wght@300;400;500&display=swap");
:root {
  --slate: #283039;
  --slate-2: #323c47;
  --sky: #38b4dd;
  --sky-ink: #1f7fa0;
  --green: #53dd6c;
  --green-d: #3fc659;
  --ink: #212121;
  --muted: #6b7280;
  --line: #ebebeb;
  --line-2: #d0d0d0;
  --bg-alt: #f4f4f4;
  --head: "Roboto Condensed", "Arial Narrow", sans-serif;
  --body: "Roboto", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  line-height: 1.65;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.topbar { padding: 16px 32px; background: var(--slate); }
.topbar .brand {
  color: #fff;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.topbar strong { color: var(--sky); }

/* ---------- Page body ---------- */
.deal { max-width: 800px; margin: 0 auto; padding: 56px 24px 64px; }
.deal h1 {
  font-family: var(--head);
  font-weight: 700;
  color: var(--slate);
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: .01em;
  margin: 0 0 12px;
  line-height: 1.12;
}
.deal h2 {
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--sky-ink);
  font-size: 22px;
  margin: 28px 0 12px;
}
.deal .meta { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
.deal .summary { font-size: 17px; color: var(--slate-2); }

/* ---------- Proof / match section ---------- */
.proof {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-left: 4px solid var(--sky);
  border-radius: 6px;
  padding: 24px 28px;
  margin: 32px 0;
}
.proof h2 { margin-top: 0; }
.proof table.matches {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 12px;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}
.proof table.matches th, .proof table.matches td {
  text-align: left;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}
.proof table.matches thead th {
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--sky-ink);
  background: #eef0f2;
  border-bottom: 2px solid var(--line-2);
}
.proof table.matches tbody tr:nth-child(even) { background: #fafbfc; }
.proof table.matches tbody tr:hover { background: #e7f6fb; }
.proof table.matches td:first-child,
.proof table.matches th:first-child { width: 40px; color: var(--muted); }
.proof table.matches tbody td:first-child { font-weight: 600; color: var(--slate-2); }
.match-disclaimer { color: var(--muted); margin: 12px 0 0; font-weight: 300; }

/* ---------- Buttons ---------- */
.flyer-links { margin: 24px 0; }
.cta {
  display: inline-block;
  margin: 8px 12px 8px 0;
  padding: 12px 26px;
  border: 2px solid var(--sky);
  border-radius: 4px;
  color: var(--sky-ink);
  background: #fff;
  text-decoration: none;
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 14px;
  transition: all .15s ease;
}
.cta:hover { background: #e7f6fb; }
.cta.primary {
  background: var(--green);
  border-color: var(--green);
  color: #0e2a14;
  box-shadow: 0 6px 16px rgba(83, 221, 108, .26);
}
.cta.primary:hover { background: var(--green-d); border-color: var(--green-d); transform: translateY(-2px); }

/* ---------- Legal page typography (privacy / terms inherit this) ---------- */
.deal p { margin: 12px 0; }
.deal a { color: var(--sky-ink); }
.deal em { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--slate);
  border-top: 0;
  padding: 32px 24px;
  text-align: center;
  color: #aeb6bd;
  font-size: 13px;
  font-weight: 300;
}
.site-footer a { color: var(--sky); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .topbar { padding: 14px 18px; }
  .topbar .brand { font-size: 19px; }
  .deal { padding: 40px 18px 48px; }
  .proof { padding: 18px 16px; }
  .proof table.matches th, .proof table.matches td { padding: 7px 9px; }
}

.deal-actions { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 20px 0 28px; }

/* Secondary text link in the action row (investors subpage). */
.investors-link {
  color: var(--sky-ink);
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.investors-link:hover { text-decoration: underline; }

/* ---------- Embedded flyer PDF (primary deal-page content) ---------- */
.flyer-embed {
  display: block;
  width: 100%;
  height: min(80vh, 1000px);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-alt);
  margin: 8px 0 0;
}
.flyer-fallback { padding: 24px; margin: 0; color: var(--muted); }
.flyer-fallback a { color: var(--sky-ink); }

/* ---------- Flyer page-image gallery (primary deal-page content) ----------
   Pages rendered to JPEG at sync time and stacked vertically. Works the same on
   desktop and mobile, unlike <object>-embedded PDFs. */
.flyer-gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 8px 0 0;
}
.flyer-gallery img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(40, 48, 57, .1);
  background: var(--bg-alt);
}
@media (max-width: 600px) {
  .flyer-gallery { gap: 12px; }
  .flyer-gallery img { border-radius: 4px; }
}

/* ---------- Open Listings index (/deals/) card grid ----------
   Scoped under .deal so it only applies on the subpages that use deal.css.
   Mirrors the landing-page card styling (site/src/styles.css). */
.deal .deal-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
  margin: 24px 0 0;
}
.deal .deal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--sky);
  border-radius: 6px;
  padding: 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 1px 2px rgba(40, 48, 57, .06);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.deal .deal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(40, 48, 57, .14);
}
.deal .deal-card h3 {
  font-family: var(--head);
  font-weight: 700;
  color: var(--slate);
  margin: 0 0 12px;
  font-size: 21px;
  letter-spacing: .01em;
}
.deal .deal-card .meta { color: var(--muted); font-size: 14.5px; line-height: 1.5; margin: 5px 0; }
.deal .deal-card .meta:last-child { color: var(--slate-2); font-weight: 500; margin-top: auto; padding-top: 8px; }
@media (max-width: 600px) {
  .deal .deal-cards { grid-template-columns: 1fr; }
}

/* Official RatePlug wordmark in the topbar + COMMERCIAL sub-brand */
.topbar .brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-logo { height: 24px; width: auto; display: block; }
.brand-sub {
  color: #38b4dd; font-family: "Roboto Condensed", sans-serif; font-weight: 700;
  font-size: 14px; letter-spacing: 0.12em; padding-left: 12px; border-left: 1px solid rgba(255,255,255,0.25);
}
