/* ==========================================================================
   Marek Zatwarnicki - site styles
   Business-card system: light paper ground, dark ink serif headings, single
   gold accent (candlestick mark), dark "card-back" bookend for the footer.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Two authored colors plus white: a very dark, near-black bottle green
     (the full-bleed bands - navbar/tabs/counters/footer - are THIS color,
     not black) and black (body text on the white page only). Everything
     else below is a computed tint/shade of these - no independent grays
     or extra hues. On the white page: black text, green accent
     (buttons/links/borders). On the dark-green bands: white text (green
     text on green-on-green would be invisible), green survives there only
     as page background itself. */
  --black: #14140f;
  --white: #f6f3ea;
  --green: #072411;

  --bg: var(--white);
  --surface: #ffffff;
  --surface-alt: color-mix(in srgb, var(--white) 94%, var(--black));
  --ink: var(--black);
  --ink-soft: color-mix(in srgb, var(--black) 84%, var(--white));
  --muted: color-mix(in srgb, var(--black) 62%, var(--white));
  --border: color-mix(in srgb, var(--black) 13%, var(--white));

  --gold: var(--green);
  --gold-dark: color-mix(in srgb, var(--green) 78%, black);
  --gold-soft: color-mix(in srgb, var(--green) 12%, var(--white));

  --dark-bg: var(--green);
  --dark-surface: var(--green);
  --dark-border: color-mix(in srgb, var(--white) 16%, var(--green));
  --dark-ink: var(--white);
  --dark-muted: color-mix(in srgb, var(--white) 64%, var(--green));

  --radius: 3px;
  --max-width: 1140px;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
}

/* On the dark-green full-bleed bands, text/hover accents flip to white -
   the band background IS the green, so green text on it would be
   invisible. Everything below still just says var(--gold); only what it
   resolves to changes. Following Marek's "Artykuły Branżowe" reference
   design: green is used sparingly (accents on the light page, and two
   deliberate dark bands - stats + footer), not as a diffuse background
   everywhere - the masthead and the tabs section are light like the rest
   of the page. */
.counters-panel,
.site-footer-bar {
  --gold: var(--dark-ink);
  --gold-dark: var(--dark-ink);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* Playfair Display defaults to old-style figures (digits of uneven height);
     lining figures keep every number level across the site. */
  font-variant-numeric: lining-nums;
}

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

a {
  color: inherit;
  text-decoration: none;
}

p {
  text-align: justify;
  text-align-last: left;
  hyphens: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
  letter-spacing: 0.01em;
}

section {
  padding: clamp(3.5rem, 7vw, 75px) 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 13px 28px;
  margin: 6px 10px 6px 0;
  border-radius: 3px;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid var(--gold);
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
}

.btn:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-2px);
}

.btn.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.hero-cta .btn {
  text-align: center;
}

.bio-social-btn {
  text-align: center;
}

.btn.btn-outline:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ---------- Navbar ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.scroll-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0%;
  background: var(--gold);
  pointer-events: none;
  transition: width 0.05s linear;
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand img {
  height: 30px;
  width: auto;
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
}

.navbar-brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.navbar-brand-tag {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-lang-item {
  display: none;
}

.nav-links a {
  display: inline-block;
  position: relative;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--ink);
  display: block;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Language toggle (lives in the navbar) ---------- */

.lang-toggle {
  display: flex;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  flex-shrink: 0;
}

.lang-toggle button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle button.active {
  background: var(--gold);
  color: var(--bg);
}

/* Wide screens: PL/EN leaves the content container and sits at the page's
   right edge (anchored to the sticky .navbar). Narrower screens have no room
   beside the links, so it stays in the bar. */
@media (min-width: 1380px) {
  .navbar-inner > .lang-toggle {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
  }
}

/* Mid-width desktops: PL/EN is back in the bar, so tighten the links to fit. */
@media (min-width: 801px) and (max-width: 1379px) {
  .nav-links {
    gap: 0;
  }
  .nav-links a {
    padding: 8px 9px;
  }
  .nav-links a::after {
    left: 9px;
    right: 9px;
  }
}

/* i18n visibility: default = English on this site */
[data-lang="en"] .i18n-pl { display: none; }
[data-lang="pl"] .i18n-en { display: none; }

/* ---------- Hero / content blocks ---------- */

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.split > * {
  /* Grid items default to min-width:auto, so unbreakable content (the
     hero h2 uses a non-breaking space between the two names) refuses to
     shrink and forces the whole grid wider than the container - the
     excess bleeds past the right padding since overflow-x:hidden clips
     it at the viewport edge instead of the container's edge. */
  min-width: 0;
}

.split.reverse .media-col {
  order: -1;
}

.eyebrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
  text-align: left;
}

.text-col h2 {
  font-size: 2.6rem;
  color: var(--ink);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.text-col .role {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 18px 0 20px;
  padding-top: 18px;
  border-top: 2px solid var(--gold);
  max-width: 420px;
}

.text-col p.eyebrow {
  color: var(--muted);
}

.text-col p {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

/* Marek's & Krzysztof's bio sections: wider text column, photo shrunk well
   below its old width. Container stays the default site width.
   #about-krzysztof uses .split.reverse, which sets .media-col{order:-1} -
   that makes the photo auto-place into the FIRST grid track, not the
   second, so its column order has to be the mirror image of #about's or
   the photo ends up in the 1fr (text) track instead of its own. */
@media (min-width: 901px) {
  #about .split {
    grid-template-columns: 1fr 260px;
  }
  #about-krzysztof .split {
    grid-template-columns: 260px 1fr;
  }
}

.media-col figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Marek's & Krzysztof's portrait photos get a thick, sharp-cornered green
   frame (natural photo proportions, not cropped to a square) - scoped here
   rather than on the shared .media-col figure rule above, since that base
   rule is also used by the hero's business-card SVG. */
#about .media-col figure,
#about-krzysztof .media-col figure {
  border-radius: 0;
  border: 12px solid var(--gold);
  aspect-ratio: 3 / 4;
}

#about .media-col figure img,
#about-krzysztof .media-col figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* display:flex on the wrapper kills the stray inline-whitespace gap that
   otherwise shows up between the figure and the social-icon bar below it. */
#about .media-col,
#about-krzysztof .media-col {
  display: flex;
  flex-direction: column;
}

.media-social {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
  padding: 14px;
  background: var(--gold);
}

.media-social a {
  width: 34px;
  height: 34px;
  border-radius: 0;
  border: 2px solid var(--surface);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.media-social a:hover {
  background: var(--gold-dark);
}

.media-social svg {
  width: 15px;
  height: 15px;
  color: var(--surface);
}

/* On mobile the photo previously rendered at full content width (no shrink -
   the 230px column above only applies at 901px+); shrink it significantly
   here too, to roughly match the desktop scale. */
@media (max-width: 900px) {
  #about .media-col,
  #about-krzysztof .media-col {
    max-width: 170px;
  }
}

/* Marek's bio on phones: name, then a larger photo, then the text. The three
   social buttons are dropped here - the icon bar under the photo links to the
   same profiles. .text-col becomes display:contents so its children and the
   photo can be ordered as one column. */
@media (max-width: 900px) {
  #about .split {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  #about .text-col {
    display: contents;
  }
  #about .text-col > .eyebrow {
    order: 1;
  }
  #about .text-col > h2 {
    order: 2;
  }
  #about .media-col {
    order: 3;
    width: 100%;
    max-width: 280px;
    margin: 14px 0 28px;
  }
  #about .text-col > p:not(.eyebrow) {
    order: 4;
  }
  #about .text-col > div {
    display: none;
  }
}

/* ---------- Tabs ---------- */

.tabs-section {
  background: var(--bg);
}

.tabs-layout {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.tabs-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 0 0 280px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: none;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  padding: 13px 16px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tab-btn .tab-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  color: currentColor;
}

.tab-btn:hover {
  color: var(--ink);
  background: var(--surface-alt);
}

.tab-btn.active {
  color: var(--gold);
  background: var(--gold-soft);
  border-color: var(--gold);
}

.tab-panels {
  flex: 1;
  min-width: 0;
  border-left: 1px solid var(--border);
  padding-left: 44px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

.tab-panel .quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  color: var(--ink);
  margin-bottom: 14px;
}

.tab-panel p {
  color: var(--ink-soft);
}

@media (max-width: 860px) {
  .tabs-layout {
    flex-direction: column;
    gap: 20px;
  }
  /* one tab per row, full width */
  .tabs-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 2px;
    flex: none;
    width: 100%;
  }
  .tab-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  .tab-panels {
    border-left: none;
    padding-left: 0;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Tabs: green band, tabs across the top ---------- */

.offer-alt-band {
  background: var(--green);
  color: var(--white);
}

.offer-alt .offer-alt-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  flex: none;
  border-bottom: 1px solid var(--dark-border);
}

.offer-alt .tab-btn {
  position: relative;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 20px 18px 18px;
  border: 0;
  border-right: 1px solid var(--dark-border);
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--white) 72%, var(--green));
  font-size: 0.84rem;
  line-height: 1.3;
}

.offer-alt .tab-btn:last-child { border-right: 0; }

.offer-alt .tab-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: transparent;
  transition: background 0.2s ease;
}

.offer-alt .tab-btn:hover {
  color: var(--white);
  background: color-mix(in srgb, var(--white) 5%, var(--green));
}

.offer-alt .tab-btn.active {
  color: var(--white);
  background: color-mix(in srgb, var(--white) 8%, var(--green));
  border-color: var(--dark-border);
}

.offer-alt .tab-btn.active::after { background: var(--white); }

.oa-no {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: color-mix(in srgb, var(--white) 55%, var(--green));
}

.offer-alt .tab-btn.active .oa-no { color: var(--white); }

.offer-alt .oa-icon { width: 17px; height: 17px; }

.offer-alt .tab-panels {
  border-left: 0;
  padding: 44px 48px 48px;
}

.oa-body {
  display: grid;
  grid-template-columns: 720px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.offer-alt .oa-title {
  margin: 0 0 14px;
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.3;
  color: var(--white);
  text-align: left;
}

.offer-alt .tab-panel .oa-main p:not(.oa-title) {
  margin: 0;
  color: color-mix(in srgb, var(--white) 86%, var(--green));
}

.oa-side {
  padding-left: 28px;
  border-left: 1px solid var(--dark-border);
}

.offer-alt .oa-k {
  margin: 4px 0 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--white) 62%, var(--green));
  text-align: left;
}

.oa-points {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.oa-points li {
  position: relative;
  padding: 8px 0 8px 18px;
  border-top: 1px solid var(--dark-border);
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--white);
}

.oa-points li:last-child { border-bottom: 1px solid var(--dark-border); }

.oa-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--white);
}

.oa-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--white);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.oa-cta::after { content: "\2192"; }

.oa-cta:hover {
  background: var(--white);
  color: var(--green);
}

@media (max-width: 1187px) {
  .oa-body { grid-template-columns: minmax(0, 1fr) 240px; }
}

@media (max-width: 960px) {
  .offer-alt .offer-alt-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .offer-alt .tab-btn { border-bottom: 1px solid var(--dark-border); }
  .oa-body { grid-template-columns: 1fr; gap: 28px; }
  .oa-side { padding-left: 0; border-left: 0; }
}

@media (max-width: 860px) {
  .offer-alt .offer-alt-nav { width: auto; }
  .offer-alt .tab-btn { padding: 14px 14px 12px; font-size: 0.8rem; }
  .offer-alt .tab-panels { padding: 28px 20px 30px; }
}

@media (max-width: 560px) {
  .offer-alt .offer-alt-nav { grid-template-columns: 1fr; }
  .offer-alt .tab-btn { border-right: 0; }
}

/* ---------- Publications ---------- */

.publications {
  margin-top: 56px;
}

.publications h3 {
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 20px;
}

.publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.pub-card {
  background: var(--surface);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s ease;
}

.pub-card:hover {
  background: var(--surface-alt);
}

.pub-card h4 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.pub-meta {
  display: inline-block;
  background: var(--gold-soft);
  color: var(--gold-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin: 0 0 2px;
}

.pub-stats {
  display: flex;
  gap: 20px;
  margin: 4px 0 8px;
}

.pub-stats span {
  color: var(--muted);
  font-size: 0.85rem;
}

.pub-stats strong {
  display: block;
  color: var(--gold-dark);
  font-family: var(--font-heading);
  font-size: 1.3rem;
}

.pub-card .btn {
  align-self: flex-start;
  margin: 0;
}

.stats-note {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 18px;
}

/* ---------- Dashboards (portfolio-style scroller) ---------- */

#dashboards,
#our-articles {
  padding-top: 0;
  padding-bottom: 0;
}

#tradingview {
  padding-top: 0;
  padding-bottom: 0;
}

#blog-preview {
  padding-bottom: 0;
}


.dashboards-wrap {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: start;
}

.dashboards-head p {
  color: var(--ink-soft);
  font-size: 0.98rem;
  overflow-wrap: break-word;
}

.dashboards-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dashboards-track::-webkit-scrollbar {
  display: none;
}

.dashboard-card {
  --gold: var(--dark-ink);
  --gold-dark: var(--dark-ink);
  flex: 0 0 260px;
  scroll-snap-align: start;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  background: var(--dark-bg);
  color: var(--dark-ink);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.2s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
}

.dashboard-card .dashboard-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark-muted);
  border: 1px solid var(--dark-border);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 16px;
}

.dashboard-card h3 {
  font-size: 1.25rem;
  color: var(--dark-ink);
  margin: 0 0 10px;
}

.dashboard-card p {
  text-align: left;
  hyphens: none;
  color: color-mix(in srgb, var(--white) 84%, var(--green));
  font-size: 0.88rem;
  flex: 1;
}

.dashboard-card .dashboard-cta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-ink);
  margin-top: 14px;
}

.dashboard-card .dashboard-cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.dashboard-card:hover .dashboard-cta svg {
  transform: translateX(3px);
}

/* Exactly 3 fixed cards here (unlike the growing Dashboards scroller above) - fit them
   all on screen, at equal width, instead of scrolling. A grid (not flex) guarantees
   identical column widths regardless of each card's own content. */
/* Narrower text column here than the default 300px, freeing up room so the 3
   fixed-width cards (same width as the main Dashboards scroller) fit without scrolling. */
#tradingview .dashboards-wrap,
#dashboards .dashboards-wrap,
#our-articles .dashboards-wrap {
  grid-template-columns: 216px 1fr;
  gap: 32px;
}

/* Safety net: keeps the cards flush against the right edge even if the
   column width above and the actual container width don't line up exactly
   (e.g. a viewport slightly under max-width), same idea as the calc below. */
#tradingview .dashboards-track,
#dashboards .dashboards-track,
#our-articles .dashboards-track {
  gap: 32px;
  justify-content: flex-end;
}

.dashboard-card.has-image {
  aspect-ratio: auto;
  overflow: hidden;
}

/* Article cards carry more text (title + longer abstract + stats) than a square
   card can hold - let them grow with content instead; the flex row (default
   align-items:stretch) then equalizes all 3 cards to the tallest one. */
#our-articles .dashboard-card {
  aspect-ratio: auto;
}

/* Subgrid rows shared by all 3 article cards, so each card's abstract starts
   below the tallest title instead of right under its own. */
#our-articles .dashboards-track {
  display: grid;
  grid-template-columns: repeat(3, 260px);
  grid-template-rows: repeat(5, auto);
  column-gap: 32px;
  row-gap: 0;
  justify-content: end;
}

#our-articles .dashboard-card {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  row-gap: 0;
}

#our-articles .dashboard-card .dashboard-tag { grid-row: 1; justify-self: start; align-self: start; }
#our-articles .dashboard-card h3 { grid-row: 2; }
#our-articles .dashboard-card p { grid-row: 3; }
#our-articles .dashboard-card .dashboard-pubstats { grid-row: 4; }
#our-articles .dashboard-card .dashboard-cta { grid-row: 5; }

/* EXPERIMENT: title + text above, 3 cards across the full container width.
   Enabled by class="exp-stacked-cards" on <body>; remove that class to revert. */
@media (min-width: 761px) {
  .exp-stacked-cards #dashboards .dashboards-wrap,
  .exp-stacked-cards #our-articles .dashboards-wrap,
  .exp-stacked-cards #tradingview .dashboards-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .exp-stacked-cards .dashboards-head {
    max-width: 640px;
  }

  .exp-stacked-cards #dashboards .dashboards-track,
  .exp-stacked-cards #tradingview .dashboards-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * 32px) / 3);
    gap: 32px;
    justify-content: start;
  }

  .exp-stacked-cards #dashboards .dashboard-card,
  .exp-stacked-cards #tradingview .dashboard-card {
    aspect-ratio: auto;
  }

  .exp-stacked-cards #our-articles .dashboards-track {
    grid-template-columns: repeat(3, 1fr);
    justify-content: stretch;
  }
}

#dashboards .dashboard-card p,
#our-articles .dashboard-card p,
#tradingview .dashboard-card p {
  text-align: justify;
}

/* Prev/next arrows for the Dashboards scroller, sitting outside the container.
   Only shown in the stacked layout on screens wide enough to fit them. */
.dash-carousel {
  position: relative;
  min-width: 0;
}

.dash-arrow {
  display: none;
}

@media (min-width: 1300px) {
  .exp-stacked-cards #dashboards .dash-arrow,
  #blog-preview .dash-arrow {
    display: flex;
  }

  .dash-arrow {
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 56px;
    padding: 0;
    background: none;
    border: none;
    color: var(--green);
    cursor: pointer;
    transition: opacity 0.2s ease;
  }

  .dash-arrow svg {
    width: 14px;
    height: 28px;
    stroke-width: 2;
  }

  .dash-arrow-prev {
    left: -72px;
  }

  .dash-arrow-next {
    right: -72px;
  }

  .dash-arrow:hover:not(:disabled) {
    opacity: 0.6;
  }

  .dash-arrow:disabled {
    cursor: default;
  }
}

/* Blog preview: 3 posts across the container, the rest reachable via arrows. */
@media (min-width: 761px) {
  #blog-preview .dashboards-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * 32px) / 3);
    gap: 32px;
    justify-content: start;
  }
}

/* Fixed slots so every Dashboards card lines up: 2-line title, 7-line text. */
#dashboards .dashboard-card h3 {
  min-height: 2lh;
}

#dashboards .dashboard-card p {
  min-height: 7lh;
}

#blog-preview .dashboard-card h3 {
  min-height: 2lh;
}

#blog-preview .dashboard-card p {
  min-height: 6lh;
}

.blog-preview-head {
  max-width: 640px;
  margin-bottom: 32px;
}

.blog-preview-head .eyebrow {
  margin-top: 0;
}

.dashboard-card.is-compact {
  aspect-ratio: auto;
  padding: 22px 24px;
}

.dashboard-card.is-compact h3 {
  margin: 10px 0 8px;
  line-height: 1.3;
  height: calc(1.25rem * 1.3 * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-card.is-compact p {
  flex: 0 0 auto;
  margin: 0 0 14px;
}

.dashboard-card.is-compact .dashboard-cta {
  margin-top: auto;
}

.dashboard-pubstats {
  display: flex;
  gap: 20px;
  margin: 4px 0 10px;
}

.dashboard-pubstats span {
  color: var(--dark-muted);
  font-size: 0.78rem;
}

.dashboard-pubstats strong {
  display: block;
  color: var(--gold);
  font-family: var(--font-heading);
  font-size: 1.2rem;
}

.dashboard-card.has-image .dc-thumb {
  display: block;
  width: 100%;
  height: auto;
  margin: 17px 0 0;
  flex-shrink: 0;
}

.dashboard-card.has-image .dashboard-cta {
  margin-top: auto;
  padding-top: 14px;
}

@media (max-width: 760px) {
  .dashboards-wrap,
  #tradingview .dashboards-wrap,
  #dashboards .dashboards-wrap,
  #our-articles .dashboards-wrap {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Phones: Dashboards, Articles and TradingView show one card at a time,
   starting with the first - swipe (or drag with a mouse) between them, or use
   the arrows on either side. */
@media (max-width: 760px) {
  #dashboards .dash-carousel,
  #our-articles .dash-carousel,
  #tradingview .dash-carousel {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 22px;
    align-items: center;
    column-gap: 8px;
    margin: 0 -14px;
  }

  #dashboards .dash-arrow,
  #our-articles .dash-arrow,
  #tradingview .dash-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: 1;
    width: 22px;
    height: 56px;
    padding: 0;
    background: none;
    border: none;
    color: var(--green);
    cursor: pointer;
    transition: opacity 0.2s ease;
  }

  #dashboards .dash-arrow-prev,
  #our-articles .dash-arrow-prev,
  #tradingview .dash-arrow-prev {
    grid-column: 1;
  }

  #dashboards .dash-arrow-next,
  #our-articles .dash-arrow-next,
  #tradingview .dash-arrow-next {
    grid-column: 3;
  }

  #dashboards .dash-arrow svg,
  #our-articles .dash-arrow svg,
  #tradingview .dash-arrow svg {
    width: 12px;
    height: 24px;
    stroke-width: 2;
  }

  #dashboards .dash-arrow:disabled,
  #our-articles .dash-arrow:disabled,
  #tradingview .dash-arrow:disabled {
    opacity: 0.25;
    cursor: default;
  }

  #dashboards .dashboards-track,
  #our-articles .dashboards-track,
  #tradingview .dashboards-track {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    grid-template-columns: none;
    column-gap: 16px;
    justify-content: start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }

  /* one card at a time, so the shared title row (sized to the longest title)
     would only leave a gap under the shorter ones */
  #our-articles .dashboards-track {
    grid-template-rows: none;
  }

  #our-articles .dashboard-card {
    display: flex;
    grid-row: auto;
  }

  #dashboards .dashboard-card,
  #our-articles .dashboard-card,
  #tradingview .dashboard-card {
    aspect-ratio: auto;
    scroll-snap-align: start;
    transform: none;
  }

  .dashboards-track.is-dragging {
    scroll-snap-type: none;
    cursor: grabbing;
    user-select: none;
  }
}

/* ---------- Counters ---------- */

.counters {
  padding: 0;
}

.counters-panel {
  background: var(--dark-bg);
  border-radius: var(--radius);
  padding: 22px 32px;
}

.counters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}

.counter-label {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--dark-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.counter-value {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--gold);
  font-weight: 600;
}

/* ---------- Contact ---------- */

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.contact-info h2 {
  font-size: 2.6rem;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.contact-info p {
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  border-top: 1px solid var(--border);
  transition: color 0.2s ease;
}

.contact-detail:first-of-type {
  border-top: none;
}

.contact-detail svg {
  width: 20px;
  height: 20px;
  color: var(--gold);
  flex-shrink: 0;
}

.contact-detail:hover {
  color: var(--gold);
}

/* The FAQ next to the contact form: sized (via flex) to end level with the
   form. .contact-wrap stretches both columns to equal height, so
   .contact-info hands that height down to .contact-faq via flex:1, and the
   list does the same for whichever answer is currently open. */
.contact-faq {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.contact-faq .eyebrow {
  margin-bottom: 4px;
}

.contact-faq .faq-list {
  max-width: none;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.contact-faq .faq-item {
  flex-shrink: 0;
}

.contact-faq .faq-question {
  padding: 12px 2px;
  font-size: 0.92rem;
}

.contact-faq .faq-answer p {
  padding: 0 2px 12px;
  font-size: 0.9rem;
  text-align: left;
}

/* Focused mode: clicking a question hides the others and the answer grows
   to fill the rest of the list's height instead of just its own content. */
.contact-faq .faq-list.expanded .faq-item {
  display: none;
}

.contact-faq .faq-list.expanded .faq-item.open {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.contact-faq .faq-list.expanded .faq-item.open .faq-question {
  flex-shrink: 0;
}

.contact-faq .faq-list.expanded .faq-item.open .faq-answer {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

/* ---------- FAQ (shared accordion base) ---------- */

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 4px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-question .plus {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--gold);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.faq-item.open .faq-question .plus {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  cursor: pointer;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  padding: 0 4px 20px;
  color: var(--ink-soft);
  margin: 0;
}

@media (max-width: 800px) {
  .contact-wrap {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* ---------- Contact form ---------- */

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
  margin: 6px 0 0;
}

.contact-form {
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 15%, transparent);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.custom-select {
  position: relative;
}

.custom-select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.custom-select-display {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--gold);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.custom-select-display:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 15%, transparent);
}

.custom-select-display svg {
  width: 15px;
  height: 15px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.custom-select.open .custom-select-display svg {
  transform: rotate(180deg);
}

.custom-select-list {
  position: absolute;
  z-index: 20;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 4px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--gold);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.custom-select-list li {
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
}

.custom-select-list li:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.custom-select-list li:hover,
.custom-select-list li.highlighted {
  background: var(--gold);
  color: var(--dark-ink);
}

.custom-select-list li[aria-selected="true"] {
  font-weight: 700;
}

.form-consent {
  text-align: left;
  hyphens: none;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 22px;
}

.form-consent a {
  color: var(--gold-dark);
  text-decoration: underline;
}

.form-honey {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.form-message {
  font-size: 0.88rem;
  margin-top: 14px;
  display: none;
}

.form-message.error {
  color: #a33b2e;
  display: block;
}

.form-message.success {
  color: #2f6b4f;
  display: block;
}

.form-success {
  display: none;
  text-align: center;
  padding: 30px 10px;
}

.form-success p {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer bar (dark "card-back" bookend, single-row) ---------- */

.site-footer-bar {
  background: var(--dark-bg);
  border-top: 2px solid var(--gold);
  padding: 30px 0;
}

.site-footer-bar .container {
  max-width: 1500px;
}

.footer-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
}

.footer-bar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-bar-brand img {
  height: 28px;
}

.fb-name {
  display: block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--dark-ink);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.fb-tagline {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 2px;
  white-space: nowrap;
}

.footer-bar-contact {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fb-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fb-contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--dark-border);
}

.fb-contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
}

.fb-contact-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  font-size: 0.86rem;
  color: var(--dark-ink);
}

.fb-contact-text:hover {
  color: var(--gold);
}

.fb-contact-text small {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.footer-bar-sep {
  width: 1px;
  align-self: stretch;
  background: var(--dark-border);
}

.social-list {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px;
}

.social-list a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.social-list a:hover {
  background: var(--gold);
  border-color: var(--gold);
}

.social-list a:hover svg {
  color: var(--dark-bg);
}

.social-list svg {
  width: 16px;
  height: 16px;
  color: var(--dark-ink);
}

.footer-bar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-bar-links a {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--dark-ink);
}

.footer-bar-links a:hover {
  color: var(--gold);
}

.footer-bar-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.footer-bar-meta span {
  font-size: 0.76rem;
  color: var(--dark-muted);
}

.footer-bar-meta .fb-credit a {
  color: var(--gold);
}

.footer-bar-meta .fb-credit a:hover {
  color: var(--dark-ink);
}

/* ---------- Floating contact widget ---------- */

.float-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.float-contact a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--dark-bg);
  color: var(--dark-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(20, 20, 15, 0.3);
  transition: background 0.2s ease, transform 0.2s ease;
}

.float-contact a:hover {
  background: var(--gold-dark);
  transform: scale(1.08);
}

.float-contact svg {
  width: 21px;
  height: 21px;
}

.float-contact svg[fill="currentColor"] {
  width: 18px;
  height: 18px;
}

@media (max-width: 640px) {
  .float-contact {
    right: 14px;
    bottom: 14px;
    gap: 10px;
  }
  .float-contact a {
    width: 42px;
    height: 42px;
  }
  .float-contact svg {
    width: 19px;
    height: 19px;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split.reverse .media-col {
    order: 0;
  }
  .media-col {
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 800px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: 0;
    left: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 4px;
    transform: translateY(-140%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(20, 20, 15, 0.08);
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nav-links a {
    padding: 12px 16px;
  }
  .nav-toggle {
    display: flex;
  }
  /* Top bar keeps only the brand + hamburger on mobile - PL/EN moves down
     into the dropdown (.nav-lang-item), which also pushes the hamburger to
     the far right since it becomes the row's only other flex item. */
  .navbar-inner > .lang-toggle {
    display: none;
  }
  .nav-lang-item {
    display: block;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .nav-lang-item .lang-toggle {
    justify-content: center;
    width: fit-content;
    margin: 0 auto;
  }
  .navbar-brand-name {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }
  .navbar-brand-tag {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--border);
  }
  section {
    padding: 44px 0;
  }
  .text-col h2 {
    font-size: 1.5rem;
  }
  #top {
    padding-top: 32px;
  }
  /* footer: left-aligned; brand, contact and meta full width, social icons
     and links side by side */
  .footer-bar-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    justify-items: start;
    align-items: start;
    gap: 26px 32px;
    text-align: left;
  }
  .footer-bar-brand,
  .footer-bar-contact,
  .footer-bar-meta {
    grid-column: 1 / -1;
  }
  .footer-bar-sep {
    display: none;
  }
  .footer-bar-meta {
    margin-left: 0;
    text-align: left;
    width: auto;
  }
}

/* ---------- Legal pages ---------- */

.legal main {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 24px 90px;
}

.legal h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.legal .updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 32px;
}

.legal .lead {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 36px;
  font-size: 0.95rem;
}

.legal section {
  border: none;
  padding: 0 0 30px;
}

.legal section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.35rem;
  margin-bottom: 12px;
  text-transform: none;
}

.legal section h2 .num {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.06em;
}

.legal section p,
.legal section li {
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.legal section p + p {
  margin-top: 10px;
}

.legal section ul {
  margin: 10px 0 0 20px;
}

.legal section li {
  margin-bottom: 6px;
}

.legal .box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 12px;
}

.legal .box dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 0.85rem;
}

.legal .box dt {
  color: var(--muted);
}

/* ---------- Privacy policy modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 20, 15, 0.55);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 78vh;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  background: var(--gold);
  flex-shrink: 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--dark-ink);
}

.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid color-mix(in srgb, var(--dark-ink) 60%, transparent);
  border-radius: 50%;
  background: transparent;
  color: var(--dark-ink);
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--dark-ink);
  background: color-mix(in srgb, var(--dark-ink) 15%, transparent);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  overflow-y: auto;
  padding: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) var(--bg);
}

.modal-body::-webkit-scrollbar {
  width: 10px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--bg);
}

.modal-body::-webkit-scrollbar-thumb {
  background-color: var(--gold);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background-color: var(--gold-dark);
}

.modal-body .legal-inner {
  max-width: 100%;
}

.modal-body .updated {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

.modal-body .lead {
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  text-align: left;
}

.modal-body section {
  border: none;
  padding: 0 0 18px;
}

.modal-body section:last-child {
  padding-bottom: 0;
}

.modal-body section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.1rem;
  margin-bottom: 10px;
  text-transform: none;
}

.modal-body section h2 .num {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.06em;
}

.modal-body section p,
.modal-body section li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  text-align: left;
}

.modal-body section p + p {
  margin-top: 10px;
}

.modal-body section ul {
  margin: 10px 0 0 20px;
}

.modal-body section li {
  margin-bottom: 6px;
}

.modal-body .box {
  background: var(--bg);
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 12px;
}

.modal-body .box dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  font-size: 0.85rem;
}

.modal-body .box dt {
  color: var(--muted);
}

@media (max-width: 600px) {
  .modal-box {
    max-height: 92vh;
  }
  .modal-header {
    padding: 16px 18px;
  }
  .modal-body {
    padding: 18px;
  }
}

/* ==========================================================================
   Blog (marekzatwarnicki-blog.html) - ported from Studio's blog.html pattern
   ========================================================================== */

.blog-hero {
  padding: 56px 0 8px;
  text-align: center;
}

.blog-hero h1 {
  font-size: 2.3rem;
  margin-bottom: 14px;
}

.blog-hero .blog-hero-lede {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  text-align-last: center;
  color: var(--muted);
}

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.blog-filter {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-dark);
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-filter:hover {
  background: var(--gold-soft);
}

.blog-filter.active {
  background: var(--gold);
  color: var(--bg);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(26, 26, 26, 0.12);
}

.blog-card[hidden] {
  display: none;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.blog-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bg);
  background: var(--gold-dark);
  border-radius: 999px;
  padding: 3px 10px;
}

.blog-date {
  font-size: 0.74rem;
  color: var(--muted);
}

.blog-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.14rem;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
  text-wrap: balance;
}

.blog-card-lede {
  font-size: 0.88rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
  text-align: left;
}

.blog-card-link {
  margin-top: auto;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.blog-articles {
  margin-top: 20px;
}

.blog-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 0 0;
  scroll-margin-top: 90px;
}

.blog-article + .blog-article {
  border-top: 1px solid var(--border);
  margin-top: 56px;
}

.blog-article h2 {
  font-size: 1.72rem;
  margin-bottom: 10px;
  text-wrap: balance;
}

.blog-article h3 {
  font-size: 1.12rem;
  margin: 30px 0 10px;
}

.blog-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.blog-article ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

.blog-article li {
  margin-bottom: 7px;
}

.blog-article p {
  margin: 0 0 16px;
}

.blog-callout {
  background: var(--gold-soft);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 0 0 20px;
}

.blog-callout p {
  margin: 0;
  font-size: 0.92rem;
}

.blog-back {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-decoration: none;
}

.blog-back:hover {
  text-decoration: underline;
}

.blog-cta {
  max-width: 760px;
  margin: 64px auto 0;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.blog-cta h2 {
  font-size: 1.5rem;
}

.blog-cta p {
  text-align: center;
  text-align-last: center;
  color: var(--muted);
  margin: 0 0 20px;
}

@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}
