:root {
  --brand: #0053E2;
  --brand-600: #0046C0;
  --brand-deep: #0A2A66;
  --yellow: #FFC220;

  --x-bg:    #FFFFFF;
  --x-panel: #FFFFFF;
  --x-text:  #0A2A66;
  --x-muted: #5B6B86;
  --x-line:  #E7ECF2;
  --x-hover: #F4F7FB;
  --x-chip:  #F4F7FB;

  --nav-w: 280px;
  --ff: system-ui, -apple-system, "Segoe UI", Tahoma, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff);
  background: var(--x-bg);
  color: var(--x-text);
  -webkit-font-smoothing: antialiased;
  transition: background 200ms ease, color 200ms ease;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ===================== APP SHELL ===================== */
.x-app {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  align-items: start;
}

/* ===================== LEFT NAV ===================== */
.x-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 10px 18px;
  background: #FFFFFF;
  border-inline-start: 1px solid var(--x-line);
  border-inline-end: 1px solid var(--x-line);
}
.x-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 4px;
  margin-bottom: 6px;
  flex: 0 0 auto;
}
.x-logo img { width: 34px; height: 34px; object-fit: contain; display: block; }
.x-logo b {
  font-size: 22px; font-weight: 800; font-style: italic;
  letter-spacing: -0.02em; color: var(--brand);
}
.x-logo .net {
  font-size: 11px; font-weight: 700; color: var(--x-muted);
  background: var(--x-chip); padding: 3px 9px; border-radius: 999px;
}

.x-menu {
  display: flex; flex-direction: column; gap: 2px; margin-top: 4px;
  overflow-y: auto; flex: 1 1 auto; min-height: 0;
  scrollbar-width: thin;
}
.x-menu::-webkit-scrollbar { width: 6px; }
.x-menu::-webkit-scrollbar-thumb { background: var(--x-line); border-radius: 999px; }
.x-menu a {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 13px;
  border-radius: 999px;
  font-size: 17.5px; font-weight: 500;
  color: var(--x-text);
  transition: background 140ms ease;
}
.x-menu a:hover { background: var(--x-hover); }
.x-menu a.is-active { font-weight: 800; color: var(--brand); }
.x-menu a.is-active svg { stroke-width: 2.6; }
.x-menu a svg { width: 24px; height: 24px; flex: 0 0 auto; stroke-width: 1.9; }

.x-cta {
  margin: 12px 6px 4px; flex: 0 0 auto;
  background: var(--brand); color: #fff;
  border: 0; border-radius: 999px;
  padding: 15px; font-size: 16px; font-weight: 800;
  transition: background 150ms ease;
  text-align: center;
}
.x-cta:hover { background: var(--brand-600); }

/* Footer social icons */
.x-foot {
  display: flex; align-items: center; gap: 6px; flex: 0 0 auto;
  margin: 14px 6px 2px; padding-top: 14px;
  border-top: 1px solid var(--x-line);
}
.x-foot a {
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--x-muted);
  transition: background 140ms ease, color 140ms ease;
}
.x-foot a:hover { background: var(--x-hover); color: var(--brand); }
.x-foot a svg { width: 19px; height: 19px; }
.x-foot__copy { margin-inline-start: auto; font-size: 11px; color: var(--x-muted); font-weight: 600; }

/* ===================== MAIN COLUMN ===================== */
.x-main {
  border-inline-end: 1px solid var(--x-line);
  min-height: 100vh;
}

/* Embedded full page (SPA-style) */
.x-page {
  width: 100%; border: 0; display: none;
  background: #FFFFFF; min-height: calc(100vh - 56px);
}
body.x-reading .x-home,
body.x-reading .x-tabs { display: none; }
body.x-reading .x-page { display: block; }

.x-back {
  display: none;
  width: 38px; height: 38px; margin-inline-end: 4px;
  border: 0; border-radius: 50%;
  background: var(--x-chip); color: var(--x-text);
  place-items: center; flex: 0 0 auto;
}
.x-back:hover { background: var(--x-hover); }
.x-back svg { width: 20px; height: 20px; }
html[dir="rtl"] .x-back svg { transform: scaleX(-1); }
body.x-reading .x-back { display: inline-grid; }
.x-colhead__head { display: flex; align-items: center; gap: 4px; min-width: 0; }
.x-colhead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--x-bg) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--x-line);
}
.x-colhead__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px;
}
.x-colhead__top h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -0.01em; }
.x-colhead__top .sub { font-size: 12px; font-weight: 700; color: var(--x-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.x-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.x-tabs button {
  position: relative;
  background: none; border: 0;
  padding: 16px 0;
  font-size: 15px; font-weight: 600; color: var(--x-muted);
  transition: background 140ms ease, color 140ms ease;
}
.x-tabs button:hover { background: var(--x-hover); }
.x-tabs button.is-active { color: var(--x-text); font-weight: 800; }
.x-tabs button.is-active::after {
  content: ""; position: absolute; bottom: 0;
  left: 50%; transform: translateX(-50%);
  width: 56px; height: 4px; border-radius: 999px;
  background: var(--brand);
}

/* Composer / search */
.x-composer {
  display: flex; gap: 14px;
  padding: 16px 18px;
  border-bottom: 10px solid var(--x-line);
}
.x-composer .x-avatar { width: 44px; height: 44px; display: grid; place-items: center; background: var(--x-chip); border-radius: 50%; font-weight: 700; }
.x-composer__field { flex: 1; min-width: 0; }
.x-composer__input {
  display: flex; align-items: center; gap: 10px;
  background: var(--x-chip); border-radius: 999px;
  padding: 12px 18px;
}
.x-composer__input svg { width: 20px; height: 20px; color: var(--x-muted); flex: 0 0 auto; }
.x-composer__input input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-family: inherit; font-size: 16px; color: var(--x-text);
}
.x-composer__input input::placeholder { color: var(--x-muted); }
.x-composer__row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
}
.x-composer__chips { display: flex; gap: 4px; }
.x-composer__chips button {
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: none; color: var(--brand);
  display: grid; place-items: center;
  transition: background 140ms ease;
}
.x-composer__chips button:hover { background: color-mix(in srgb, var(--brand) 12%, transparent); }
.x-composer__chips svg { width: 19px; height: 19px; }
.x-composer__go {
  background: var(--brand); color: #fff; border: 0;
  border-radius: 999px; padding: 9px 22px;
  font-size: 14px; font-weight: 800;
  transition: background 150ms ease;
}
.x-composer__go:hover { background: var(--brand-600); }

/* ===================== FEED POSTS ===================== */
.x-feed { display: flex; flex-direction: column; }
.x-post {
  display: flex; gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--x-line);
  transition: background 140ms ease;
}
.x-post:hover { background: var(--x-hover); }
.x-post__ava {
  width: 46px; height: 46px; border-radius: 14px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff; font-weight: 700;
}
.x-post__ava svg { width: 24px; height: 24px; }
.x-post__ava.is-yellow { background: var(--yellow); color: var(--brand-deep); }
.x-post__ava.is-blue   { background: var(--brand); }
.x-post__ava.is-deep   { background: var(--brand-deep); }
.x-post__ava.is-sky    { background: #4DBDF5; color: var(--brand-deep); }
.x-post__ava.is-green  { background: #128A4D; }
.x-post__ava.is-clay   { background: #C0573B; }

.x-post__body { flex: 1; min-width: 0; }
.x-post__head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.x-post__head b { font-size: 15.5px; font-weight: 800; }
.x-post__head .handle { font-size: 14px; color: var(--x-muted); font-weight: 500; }
.x-post__head .num {
  margin-inline-start: auto; font-size: 12px; font-weight: 700;
  color: var(--x-muted); letter-spacing: 0.06em;
}
.x-post__text { margin: 5px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--x-text); }
.x-post__media {
  display: block; position: relative; isolation: isolate;
  margin-top: 12px; border-radius: 18px; overflow: hidden;
  aspect-ratio: 16 / 9; border: 1px solid var(--x-line);
}
.x-post__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.x-post__media .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,42,102,0) 35%, rgba(10,42,102,0.72) 100%);
}
.x-post__media.is-solid { aspect-ratio: 16 / 7; display: flex; align-items: flex-end; padding: 18px; }
.x-post__media.solid-yellow { background: var(--yellow); }
.x-post__media.solid-blue   { background: var(--brand); }
.x-post__media .tag {
  position: relative; z-index: 1;
  font-size: 13px; font-weight: 800; letter-spacing: 0.04em;
  color: #fff;
}
.x-post__media.solid-yellow .tag { color: var(--brand-deep); }
.x-post__media .swatches { position: relative; z-index: 1; display: flex; gap: 8px; }
.x-post__media .swatches i { width: 30px; height: 30px; border-radius: 8px; display: block; border: 2px solid rgba(255,255,255,0.65); }
.x-post__actions {
  display: flex; align-items: center; gap: 26px;
  margin-top: 12px; color: var(--x-muted);
}
.x-post__actions .act { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.x-post__actions .act svg { width: 18px; height: 18px; }
.x-post__open {
  margin-inline-start: auto;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; color: var(--brand);
}
.x-post__open svg { width: 16px; height: 16px; }

.x-end {
  padding: 26px 18px 60px; text-align: center;
  color: var(--x-muted); font-size: 13px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1000px) {
  .x-app { grid-template-columns: 88px minmax(0, 1fr); max-width: 760px; }
  .x-logo b, .x-logo .net,
  .x-menu a span { display: none; }
  .x-logo { justify-content: center; padding: 8px 0 4px; }
  .x-menu a { justify-content: center; padding: 12px; }
  .x-cta { padding: 14px 0; font-size: 0; }
  .x-cta::before { content: "+"; font-size: 24px; font-weight: 700; }
  .x-foot { flex-wrap: wrap; justify-content: center; }
  .x-foot__copy { display: none; }
}
@media (max-width: 680px) {
  .x-app { grid-template-columns: 1fr; max-width: 100%; }
  .x-nav {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0;
    height: auto; width: 100%;
    flex-direction: row; align-items: center; justify-content: space-around;
    padding: 6px 8px;
    border: 0; border-top: 1px solid rgba(255,255,255,0.12);
    background: var(--x-bg); z-index: 60;
  }
  .x-logo, .x-cta, .x-foot { display: none; }
  .x-menu { flex-direction: row; gap: 2px; margin: 0; overflow: visible; }
  .x-menu a { padding: 10px; }
  .x-menu a:nth-child(n+6) { display: none; }
  .x-main { border: 0; padding-bottom: 70px; }
  .x-fab {
    position: fixed; inset-inline-end: 18px; bottom: 78px; z-index: 65;
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--brand); color: #fff; border: 0;
    display: grid; place-items: center;
    box-shadow: 0 8px 24px -8px rgba(0,83,226,0.6);
  }
  .x-fab svg { width: 26px; height: 26px; }
}
@media (min-width: 681px) { .x-fab { display: none; } }

/* Body Background override */
/* Body */
body {
  background-color: rgb(15,91,212) !important;
}

/* Page-local helpers for the Logo chapter */
.lg-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 3px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 36px;
}
.lg-tile--white { background: #FFFFFF; border: 1px solid var(--hairline); }
.lg-tile--navy  { background: var(--brand-deep); }
.lg-tile--blue  { background: var(--brand); }
.lg-tile--yellow{ background: var(--yellow); }
.lg-tile__label {
  position: absolute;
  top: 18px; left: 22px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lg-tile--navy .lg-tile__label,
.lg-tile--blue .lg-tile__label { color: rgba(255,255,255,0.65); }
.lg-tile--yellow .lg-tile__label { color: rgba(10,42,102,0.55); }
.lg-tile__caption {
  position: absolute;
  bottom: 18px; left: 22px;
  font-size: 13px; font-weight: 500;
  color: var(--brand-deep);
}
.lg-tile--navy .lg-tile__caption,
.lg-tile--blue .lg-tile__caption { color: #FFFFFF; }
.lg-tile img {
  max-width: 70%;
  max-height: 70%;
  width: auto; height: auto;
  object-fit: contain;
}
.lg-tile--wordmark img { max-width: 80%; }

.lg-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.lg-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.lg-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 880px) { .lg-grid-3, .lg-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lg-grid-2, .lg-grid-3, .lg-grid-4 { grid-template-columns: 1fr; } }

.lg-clear {
  position: relative;
  background: #F7F9FC;
  border-radius: 3px;
  aspect-ratio: 16/10;
  display: grid;
  place-items: center;
  padding: 40px;
  overflow: hidden;
}
.lg-clear__icon {
  position: relative;
  width: 36%;
}
.lg-clear__icon img { width: 100%; display: block; }
.lg-clear__box {
  position: absolute;
  inset: 22%;
  border: 1px dashed var(--brand);
}
.lg-clear__caption {
  position: absolute;
  top: 24px; left: 24px;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand);
}

.lg-minSize {
  display: flex; align-items: end; gap: 48px;
  background: #F7F9FC;
  border-radius: 3px;
  padding: 40px;
  aspect-ratio: 16/10;
  justify-content: center;
}
.lg-minSize__col { text-align: center; }
.lg-minSize__col img { display: block; margin: 0 auto 12px; }
.lg-minSize__col span {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

.lg-misuse { background: #F7F9FC; aspect-ratio: 1/1; }
.lg-misuse__label { color: var(--danger) !important; }
.lg-misuse--rotate img { transform: rotate(14deg); }
.lg-misuse--stretch img { transform: scaleX(0.55); }
.lg-misuse--recolor img { filter: hue-rotate(120deg) saturate(0.7); }
.lg-misuse--outline { position: relative; }
.lg-misuse--outline::after {
  content: "";
  position: absolute;
  inset: 30%;
  border: 3px solid var(--brand-deep);
  border-radius: 3px;
}

/* Force page background to white */
.x-app .x-main .bs-page {
  background-color: #ffffff;
}

/* Make promo cards row good, flexible and normal style */
.bs-promo__row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 16px !important;
  overflow-x: visible !important;
}

.bs-promoCard {
  aspect-ratio: 3 / 4 !important;
  width: 100% !important;
  height: auto !important;
}

/* Main */
.x-app .x-main {
  background-color: #ffffff;
}
