/* Pregão — modern fintech market magazine
   Deep blue #13294b / coral #e84855 / light bg #eef2f7 / slate #1e2630 */

:root {
  --blue: #13294b;
  --blue-700: #1c3a63;
  --blue-600: #2a4f80;
  --coral: #e84855;
  --coral-dark: #cf3643;
  --bg: #eef2f7;
  --bg-card: #ffffff;
  --slate: #1e2630;
  --slate-2: #4a5566;
  --slate-3: #7b8597;
  --line: #d6deea;
  --line-soft: #e6ebf3;
  --green: #2f8f5b;
  --shadow-sm: 0 1px 2px rgba(19, 41, 75, 0.06);
  --shadow-md: 0 6px 24px rgba(19, 41, 75, 0.09);
  --maxw: 1180px;
  --maxw-read: 760px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

/* Dark theme tokens */
html[data-theme="dark"] {
  --blue: #0d1d38;
  --blue-700: #16294a;
  --bg: #0b1424;
  --bg-card: #121f35;
  --slate: #e7edf6;
  --slate-2: #aab6c9;
  --slate-3: #7e8ca4;
  --line: #23344f;
  --line-soft: #1b293f;
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--slate);
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }

img, svg { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Top strip ---------- */
.topbar {
  background: var(--blue);
  color: #cfe0f5;
  font-size: 12.5px;
  border-bottom: 3px solid var(--coral);
}
.topbar .wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap;
}
.topbar .ticker { display: flex; gap: 18px; overflow: hidden; }
.topbar .ticker span { white-space: nowrap; letter-spacing: .2px; }
.topbar .ticker b { font-weight: 600; }
.pos { color: #6fe0a6; }
.neg { color: #ff9aa6; }
.topbar .date { color: #9fb6d4; white-space: nowrap; }

/* ---------- Header (stacked) ---------- */
.site-head {
  background: var(--bg-card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.brand-row { padding: 22px 0 16px; text-align: center; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing: -.02em; color: var(--blue);
  font-size: 34px; line-height: 1;
}
.brand:hover { text-decoration: none; color: var(--blue); }
.brand .mark { width: 30px; height: 30px; }
.brand .tld { color: var(--coral); font-weight: 700; }
.tagline {
  margin: 7px 0 0; font-size: 13px; color: var(--slate-3);
  letter-spacing: .04em; text-transform: uppercase;
}

/* nav */
.nav {
  border-top: 1px solid var(--line-soft);
  background: var(--bg-card);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; }
.nav ul {
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap;
}
.nav li a {
  display: block; padding: 14px 16px;
  color: var(--slate); font-weight: 600; font-size: 14.5px;
  border-bottom: 3px solid transparent;
}
.nav li a:hover { color: var(--coral); text-decoration: none; }
.nav li a[aria-current="page"] {
  color: var(--coral); border-bottom-color: var(--coral);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  background: transparent; border: 1px solid var(--line); color: var(--slate-2);
  width: 34px; height: 34px; border-radius: 8px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--coral); color: var(--coral); }
.menu-toggle { display: none; }

/* ---------- Shared sections ---------- */
.section { padding: 46px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 22px; gap: 12px; flex-wrap: wrap;
}
.section-head h2 {
  margin: 0; font-size: 22px; letter-spacing: -.01em; color: var(--blue);
  display: flex; align-items: center; gap: 10px;
}
.section-head h2::before {
  content: ""; width: 4px; height: 20px; background: var(--coral); border-radius: 2px;
}
.section-head a.more { font-size: 13.5px; font-weight: 600; }

.kicker {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .09em; color: var(--coral);
}

/* ---------- Hero (homepage) ---------- */
.hero { padding: 40px 0 10px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 26px;
}
.hero-main {
  position: relative; border-radius: 16px; overflow: hidden;
  background: var(--blue); min-height: 430px;
  box-shadow: var(--shadow-md); display: flex; align-items: flex-end;
}
.hero-main .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.hero-main .overlay-grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(13,29,56,.25) 0%, rgba(13,29,56,.85) 70%, rgba(13,29,56,.95) 100%);
}
.hero-main .body {
  position: relative; z-index: 2; padding: 34px 34px 32px; color: #fff;
}
.hero-main .kicker { color: #ffd2d6; }
.hero-main h1 {
  margin: 12px 0 12px; font-size: 38px; line-height: 1.12; letter-spacing: -.02em;
  font-weight: 800; color: #fff;
}
.hero-main h1 a { color: inherit; }
.hero-main h1 a:hover { color: inherit; text-decoration: none; }
.hero-main p { margin: 0 0 16px; font-size: 16.5px; color: #d6e2f2; max-width: 580px; }
.hero-main .meta { font-size: 13px; color: #aac0db; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-main .meta a { color: #d6e2f2; }
.hero-main .meta a:hover { color: #fff; }

.hero-side { display: flex; flex-direction: column; gap: 18px; }
.hero-side .card-mini {
  display: grid; grid-template-columns: 112px 1fr; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden; padding: 12px;
}
.hero-side .card-mini .thumb { height: 100px; border-radius: 8px; object-fit: cover; }
.hero-side .card-mini h3 {
  margin: 6px 0 6px; font-size: 15.5px; line-height: 1.3; font-weight: 700; color: var(--blue);
}
.hero-side .card-mini h3 a { color: inherit; }
.hero-side .card-mini .when { font-size: 12px; color: var(--slate-3); }

/* ---------- Card grid (image overlay) ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .media {
  position: relative; height: 178px; background: var(--blue);
}
.card .media .thumb { width: 100%; height: 100%; object-fit: cover; }
.card .media .pill {
  position: absolute; top: 12px; left: 12px; background: var(--coral);
  color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 5px 10px; border-radius: 6px;
}
.card .media .pill.b3 { background: var(--blue-700); }
.card .body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card .body h3 {
  margin: 0 0 10px; font-size: 19px; line-height: 1.28; letter-spacing: -.005em;
  font-weight: 700; color: var(--blue);
}
.card .body h3 a { color: inherit; }
.card .body h3 a:hover { text-decoration: none; color: var(--coral); }
.card .body p { margin: 0 0 14px; color: var(--slate-2); font-size: 15px; flex: 1; }
.card .byline { font-size: 12.5px; color: var(--slate-3); }

/* ---------- Watch list ---------- */
.watch {
  background: var(--blue); color: #e7edf6; border-radius: 16px;
  padding: 30px 32px; margin-top: 8px;
}
.watch h2 { color: #fff; margin: 0 0 4px; font-size: 21px; }
.watch .lead { color: #b8c8de; margin: 0 0 18px; font-size: 14.5px; }
.watch ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px; }
.watch li { display: flex; gap: 11px; align-items: flex-start; }
.watch .num {
  flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--coral);
  color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.watch b { color: #fff; font-weight: 600; }
.watch p { margin: 2px 0 0; font-size: 14px; color: #c5d3e8; }

/* ---------- Article (wide magazine) ---------- */
.article-head {
  padding: 36px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 28px;
}
.article-head .wrap { max-width: var(--maxw-read); }
.article-head .crumb { font-size: 13px; color: var(--slate-3); margin-bottom: 14px; }
.article-head .crumb a { color: var(--slate-2); }
.article-head h1 {
  margin: 0 0 16px; font-size: 40px; line-height: 1.1; letter-spacing: -.02em;
  font-weight: 800; color: var(--blue);
}
.article-head .deck {
  font-size: 19px; color: var(--slate-2); margin: 0 0 22px; line-height: 1.5;
}
.article-head .meta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-bottom: 22px; font-size: 13.5px; color: var(--slate-3);
}
.article-head .meta-row .avatar { width: 42px; height: 42px; border-radius: 50%; }
.article-head .meta-row b { color: var(--slate); font-weight: 600; }

.article-body { max-width: var(--maxw-read); margin: 0 auto; }
.article-body > figure { margin: 0 0 26px; }
.article-body figure img { border-radius: 12px; width: 100%; }
.article-body figcaption { font-size: 13px; color: var(--slate-3); margin-top: 10px; text-align: center; }

.article-body p { margin: 0 0 22px; font-size: 18px; line-height: 1.72; }
.article-body h2 {
  margin: 34px 0 14px; font-size: 25px; color: var(--blue); letter-spacing: -.01em;
  font-weight: 700;
}
.article-body blockquote {
  margin: 26px 0; padding: 8px 0 8px 22px; border-left: 4px solid var(--coral);
  font-size: 20px; line-height: 1.5; color: var(--slate); font-style: italic;
}
.article-body blockquote cite { display: block; font-size: 14px; font-style: normal; color: var(--slate-3); margin-top: 8px; }
.article-body ul { margin: 0 0 22px; padding-left: 22px; }
.article-body li { margin-bottom: 10px; font-size: 17.5px; line-height: 1.6; }

.data-box {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; margin: 26px 0;
}
.data-box h4 { margin: 0 0 12px; font-size: 14px; color: var(--coral); text-transform: uppercase; letter-spacing: .06em; }
.data-box table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-box td { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.data-box td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.data-box tr:last-child td { border-bottom: none; }

.update-note {
  font-size: 13.5px; color: var(--slate-3); font-style: italic; margin: 30px 0 0;
  padding-top: 18px; border-top: 1px solid var(--line-soft);
}

/* tags + share */
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 28px 0 10px; }
.tag-row a {
  font-size: 12.5px; padding: 5px 11px; border-radius: 20px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--slate-2);
}
.tag-row a:hover { border-color: var(--coral); color: var(--coral); text-decoration: none; }

/* ---------- Author box ---------- */
.author-box {
  display: flex; gap: 16px; align-items: flex-start; margin: 34px 0;
  padding: 22px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; }
.author-box h4 { margin: 0 0 4px; font-size: 16px; color: var(--blue); }
.author-box p { margin: 0; font-size: 14.5px; color: var(--slate-2); }
.author-box a { font-size: 13.5px; }

/* ---------- Related ---------- */
.related { padding: 30px 0 50px; border-top: 1px solid var(--line); }
.related .card-grid { grid-template-columns: repeat(3, 1fr); }
.related .card .media { height: 150px; }

/* ---------- Page hero (static pages) ---------- */
.page-hero { padding: 44px 0 10px; }
.page-hero .wrap { max-width: var(--maxw-read); }
.page-hero h1 {
  margin: 0 0 14px; font-size: 36px; letter-spacing: -.02em; color: var(--blue); font-weight: 800;
}
.page-hero p.lead { font-size: 18px; color: var(--slate-2); margin: 0; }
.prose { max-width: var(--maxw-read); margin: 0 auto; padding: 8px 0 30px; }
.prose h2 { margin: 30px 0 12px; font-size: 23px; color: var(--blue); }
.prose h3 { margin: 24px 0 10px; font-size: 18px; color: var(--slate); }
.prose p { font-size: 17px; line-height: 1.7; margin: 0 0 18px; color: var(--slate); }
.prose ul { padding-left: 22px; margin: 0 0 18px; }
.prose li { margin-bottom: 8px; font-size: 16.5px; }
.prose a { font-weight: 600; }

/* ---------- Articles listing ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.filters a {
  font-size: 13.5px; padding: 7px 14px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--slate-2); background: var(--bg-card);
}
.filters a.active, .filters a:hover { background: var(--blue); color: #fff; border-color: var(--blue); text-decoration: none; }

.list-item {
  display: grid; grid-template-columns: 200px 1fr; gap: 22px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.list-item:first-of-type { border-top: 1px solid var(--line); }
.list-item .thumb { width: 100%; height: 130px; border-radius: 10px; object-fit: cover; }
.list-item .kicker { margin-bottom: 7px; }
.list-item h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.25; color: var(--blue); font-weight: 700; }
.list-item h3 a { color: inherit; }
.list-item p { margin: 0 0 10px; color: var(--slate-2); font-size: 15.5px; }
.list-item .when { font-size: 13px; color: var(--slate-3); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.contact-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: 26px;
}
.contact-card h3 { margin: 0 0 8px; color: var(--blue); font-size: 18px; }
.contact-card a.mail { font-size: 18px; font-weight: 700; color: var(--coral); }
.contact-card p { color: var(--slate-2); font-size: 15.5px; margin: 10px 0 0; }

/* ---------- Footer ---------- */
.site-foot { background: var(--blue); color: #b9c8de; padding: 46px 0 24px; margin-top: 20px; }
.site-foot .grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-foot h4 { color: #fff; font-size: 14px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .07em; }
.site-foot a { color: #b9c8de; }
.site-foot a:hover { color: #fff; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 9px; font-size: 14.5px; }
.site-foot .brand-mini { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 800; font-size: 22px; margin-bottom: 12px; }
.site-foot .brand-mini .mark { width: 26px; height: 26px; }
.site-foot p { font-size: 14px; color: #9fb6d4; line-height: 1.6; max-width: 320px; }
.foot-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 34px; padding-top: 18px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: #87a0c0;
}
.foot-bottom a { color: #87a0c0; }

/* ---------- Cookie notice ---------- */
.cookie {
  position: fixed; bottom: 16px; left: 16px; right: 16px; max-width: 520px;
  margin: 0 auto; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow-md);
  z-index: 80; display: none; gap: 14px; align-items: flex-start;
}
.cookie.show { display: flex; }
.cookie p { margin: 0; font-size: 13.5px; color: var(--slate-2); line-height: 1.5; }
.cookie .btns { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.btn {
  font-family: inherit; cursor: pointer; border-radius: 8px; font-weight: 600;
  font-size: 14px; padding: 9px 16px; border: 1px solid transparent;
}
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: var(--coral-dark); }
.btn-ghost { background: transparent; color: var(--slate-2); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-main { min-height: 360px; }
  .hero-main h1 { font-size: 28px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .related .card-grid { grid-template-columns: 1fr; }
  .site-foot .grid { grid-template-columns: 1fr 1fr; }
  .watch ul { grid-template-columns: 1fr; }
  .list-item { grid-template-columns: 120px 1fr; gap: 14px; }
  .list-item .thumb { height: 90px; }
  .article-head h1, .page-hero h1 { font-size: 30px; }
  .article-body p { font-size: 17px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .nav .wrap { position: relative; }
  .nav ul {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column;
    background: var(--bg-card); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); display: none;
  }
  .nav ul.open { display: flex; }
  .nav li a { border-bottom: 1px solid var(--line-soft); }
  .nav li a[aria-current="page"] { border-bottom-color: var(--line-soft); }
  .menu-toggle { display: inline-flex; }
  .hero-main .body { padding: 24px 22px; }
  .hero-main h1 { font-size: 24px; }
  .hero-side .card-mini { grid-template-columns: 90px 1fr; }
  .site-foot .grid { grid-template-columns: 1fr; gap: 24px; }
  .list-item { grid-template-columns: 1fr; }
  .list-item .thumb { height: 160px; }
  .article-head h1, .page-hero h1 { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
