/* UnBanMe blog uses the same tokens as the main page (styles.css). */

:root {
  color-scheme: light;
  --navy: #06214a;
  --blue-600: #0a6fe8;
  --cyan-400: #1cc8ff;
  --green-500: #1fbf75;
  --ink: #102033;
  --muted: #5f6f84;
  --faint: #8598ad;
  --line: #d8e6f7;
  --line-soft: #e9f2fc;
  --surface: #ffffff;
  --surface-soft: #f3f8ff;
  --tint: #eef6ff;
  --grad-brand: linear-gradient(135deg, var(--blue-600) 0%, var(--cyan-400) 100%);
  --shadow-sm: 0 2px 8px rgba(6, 33, 74, 0.05);
  --shadow-md: 0 16px 40px -18px rgba(6, 33, 74, 0.28);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --shell: 1120px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(28, 200, 255, 0.16), transparent 60%),
    radial-gradient(760px 460px at 6% 4%, rgba(10, 111, 232, 0.1), transparent 55%),
    var(--surface-soft);
  background-attachment: fixed;
}

/* Same quiet ledger grid used in the main hero. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(6, 71, 168, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(6, 71, 168, 0.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(90% 70% at 50% 0%, #000 30%, transparent 100%);
  pointer-events: none;
}
.bhead, .bwrap, .bfoot { position: relative; z-index: 1; }

.bshell { width: min(100% - 2.5rem, var(--shell)); margin-inline: auto; }

/* Header */
.bhead {
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 10;
}
.bhead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.bbrand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.bbrand__mark { display: inline-flex; }
.bbrand__mark svg {
  width: 30px;
  height: 32px;
  filter: drop-shadow(0 4px 10px rgba(10, 111, 232, 0.28));
}
.bbrand__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.bnav { display: flex; align-items: center; gap: 1.4rem; }
.bnav a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.bnav a:hover { color: var(--blue-600); }

.bbtn {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border-radius: var(--r-pill);
  background: var(--grad-brand);
  color: #fff !important;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.bbtn:hover { filter: brightness(1.06); }
.bbtn--lg { padding: 0.85rem 1.7rem; font-size: 1.02rem; }

/* Layout */
.bwrap { padding: 2rem 0 4rem; }
.bcrumb { font-size: 0.86rem; color: var(--faint); }
.bcrumb a { color: var(--muted); text-decoration: none; }
.bcrumb a:hover { color: var(--blue-600); }
.bcrumb span { margin: 0 0.4rem; }

.bpost {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 4vw, 3.25rem);
  box-shadow: var(--shadow-sm);
  max-width: 760px;
  margin-inline: auto;
}
.bpost h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0 0 0.75rem;
}
.bpost h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  margin: 2.6rem 0 0.8rem;
  letter-spacing: -0.01em;
}
.bpost h3 { font-size: 1.14rem; color: var(--navy); margin: 1.9rem 0 0.5rem; }
.bpost p, .bpost li { color: #26384d; }
.bpost a { color: var(--blue-600); text-decoration: underline; text-underline-offset: 2px; }
.bpost ul, .bpost ol { padding-left: 1.3rem; }
.bpost li { margin: 0.4rem 0; }
.bpost strong { color: var(--navy); }

.bmeta { color: var(--faint); font-size: 0.88rem; margin: 0 0 2rem; }
.blead { font-size: 1.1rem; color: var(--muted); }

.bpost code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--tint);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.12em 0.4em;
  word-break: break-all;
}
.bpost pre {
  background: var(--navy);
  color: #dbeaff;
  border-radius: var(--r-md);
  padding: 1rem 1.15rem;
  overflow-x: auto;
}
.bpost pre code { background: none; border: 0; color: inherit; word-break: normal; }

.bpost blockquote {
  margin: 1.6rem 0;
  padding: 1rem 1.25rem;
  background: var(--tint);
  border-left: 3px solid var(--blue-600);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.bpost blockquote p { margin: 0; color: var(--navy); }

.bpost table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.94rem;
  display: block;
  overflow-x: auto;
}
.bpost th, .bpost td { border: 1px solid var(--line); padding: 0.6rem 0.8rem; text-align: left; }
.bpost th { background: var(--tint); color: var(--navy); font-weight: 600; }

.bpost hr { border: 0; border-top: 1px solid var(--line-soft); margin: 2.5rem 0; }

/* Article list */
.blist {
  list-style: none;
  padding: 0;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
  max-width: var(--shell);
  align-items: stretch;
}
.blist li { display: flex; }
.blist a {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  padding: 1.4rem 1.6rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}
.blist a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.blist h2 { font-family: var(--font-display); font-size: 1.2rem; color: var(--navy); margin: 0 0 0.4rem; }
.blist p { color: var(--muted); margin: 0 0 0.6rem; font-size: 0.96rem; }
.blist .bmeta { margin: auto 0 0; }

/* Call to action */
.bcta {
  max-width: 760px;
  margin: 2rem auto 0;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: var(--r-lg);
  background: var(--navy);
  color: #eaf3ff;
  box-shadow: var(--shadow-md);
}
.bcta h2 { font-family: var(--font-display); color: #fff; margin: 0 0 0.6rem; font-size: 1.45rem; }
.bcta p { color: #b9d2f0; margin: 0 0 1.4rem; }

/* Footer */
.bfoot {
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
  padding: 2rem 0;
  margin-top: 3rem;
}
.bfoot p { color: var(--faint); font-size: 0.87rem; max-width: 760px; margin: 0 0 0.6rem; }
.bfoot__links a { color: var(--muted); text-decoration: none; }
.bfoot__links a:hover { color: var(--blue-600); }

@media (max-width: 640px) {
  .bnav { gap: 0.9rem; }
  .bnav a:not(.bbtn) { display: none; }
}

/* Article top bar: back link and breadcrumbs */
.btopbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 760px;
  margin: 0 auto 1.4rem;
}
.bback {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s var(--ease-out, ease), border-color 0.15s, color 0.15s;
}
.bback svg { width: 17px; height: 17px; }
.bback:hover {
  transform: translateX(-2px);
  border-color: var(--blue-600);
  color: var(--blue-600);
}
.bbacklink { max-width: 760px; margin: 1.75rem auto 0; }

/* Article list: single column on narrow screens */
@media (max-width: 780px) {
  .blist { grid-template-columns: minmax(0, 1fr); }
}

/* List page header spans the article grid width */
.bpost.blist-head { max-width: var(--shell); }

/* Company block at the end of an article */
.babout {
  max-width: 760px;
  margin: 2.5rem auto 0;
  padding: clamp(1.4rem, 3vw, 2.1rem);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-600);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.babout__mark { flex: 0 0 auto; }
.babout__mark svg {
  width: 38px;
  height: 41px;
  filter: drop-shadow(0 4px 10px rgba(10, 111, 232, 0.28));
}
.babout__body { min-width: 0; }
.babout h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin: 0 0 0.6rem;
}
.babout p { color: #26384d; margin: 0 0 0.75rem; font-size: 0.97rem; }
.babout p:last-child { margin-bottom: 0; }
.babout strong { color: var(--navy); }

@media (max-width: 560px) {
  .babout { flex-direction: column; gap: 0.9rem; }
}
