/* Ahmad Sabagh's Blog: a mid-2000s blog template (Blogger / MSN Spaces era)
   in Windows XP's Luna colours. Plain CSS, no scripts needed. */
:root {
  --blue: #215dc6;
  --blue-dark: #0a246a;
  --link: #1d4fa8;
  --visited: #6b3fa0;
  --text: #222;
  --muted: #6d6d6d;
  --line: #7f9db9;
  --pane: #d6dff7;
  --font: Tahoma, Verdana, 'Segoe UI', 'Noto Sans Arabic', Geneva, sans-serif;
  --display: 'Trebuchet MS', Tahoma, 'Noto Sans Arabic', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #7a96df linear-gradient(180deg, #7a96df 0, #a7bdf0 320px, #dfe8fb 900px) no-repeat;
  color: var(--text);
  font: 13px/1.6 var(--font);
}
a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover { color: #e06a00; }
img { max-width: 100%; height: auto; }

/* ---------- The navbar across the top (like Blogger's, 2005) ---------- */
.xb-navbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 30px;
  padding: 3px 12px;
  border-bottom: 1px solid #0831d9;
  background: linear-gradient(180deg, #3d7bd9, #2458c5 60%, #1b48b4);
  color: #fff;
  font-size: 12px;
}
.xb-navbar a, .xb-navbar a:visited { color: #fff; text-decoration: none; }
.xb-navbar a:hover { text-decoration: underline; }
.xb-os { display: inline-flex; align-items: center; gap: 6px; font-weight: bold; text-shadow: 1px 1px 1px rgba(0, 0, 0, .35); }
.xb-flag {
  width: 16px;
  height: 16px;
  background:
    linear-gradient(#f35325, #f35325) 0 0 / 7px 7px no-repeat,
    linear-gradient(#81bc06, #81bc06) 9px 0 / 7px 7px no-repeat,
    linear-gradient(#05a6f0, #05a6f0) 0 9px / 7px 7px no-repeat,
    linear-gradient(#ffba08, #ffba08) 9px 9px / 7px 7px no-repeat;
  transform: skewY(-6deg);
}
.xb-search { display: flex; gap: 4px; margin-inline-start: auto; }
.xb-search input {
  width: 180px;
  padding: 2px 4px;
  border: 1px solid #0831d9;
  border-radius: 0;
  font: 12px var(--font);
}
.xb-search button, .xb-btn {
  padding: 1px 10px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #ece9d8 86%, #d6d0c5);
  color: #000;
  font: 12px var(--font);
  cursor: pointer;
}
.xb-search button:hover { box-shadow: inset 0 0 0 1px #f8b330; }
.in-os .xb-back { display: none; } /* inside Sabagh OS the desktop is right there */

/* ---------- Page ---------- */
.xb-page { max-width: 980px; margin: 18px auto 30px; padding: 0 14px; }
.xb-header {
  position: relative;
  overflow: hidden;
  padding: 26px 28px 22px;
  border: 1px solid #0831d9;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #0997ff, #0053ee 8%, #0050ee 40%, #06f 88%, #06f 93%, #005bff 95%, #003dd7 96%, #003dd7);
  color: #fff;
  box-shadow: inset 0 1px #6da9ff;
}
/* A little of Bliss's sky and hill in the corner. */
.xb-header::after {
  content: '';
  position: absolute;
  inset: auto -40px -60px auto;
  width: 360px;
  height: 120px;
  border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at 40% 20%, #74c645, #3f9a1c 70%);
  opacity: .55;
  pointer-events: none;
}
.xb-title { position: relative; z-index: 1; margin: 0; font: bold 32px/1.15 var(--display); text-shadow: 1px 2px 2px rgba(0, 0, 40, .5); }
.xb-title a, .xb-title a:visited { color: #fff; text-decoration: none; }
.xb-tagline { position: relative; z-index: 1; margin: 6px 0 0; color: #dfe9ff; font-size: 13px; }

.xb-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 22px;
  padding: 20px 22px 26px;
  border: 1px solid #0831d9;
  border-top: 3px solid #f0a42d;
  border-radius: 0 0 8px 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 20, 80, .25);
}

/* ---------- Posts ---------- */
.xb-date {
  margin: 22px 0 8px;
  color: var(--muted);
  font: bold 11px var(--font);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.xb-date:first-child, .xb-notice + .xb-date { margin-top: 0; }
.xb-date span { display: block; padding-bottom: 3px; border-bottom: 1px dotted #b7c4de; }
.xb-post { margin-bottom: 26px; }
.xb-post[dir='rtl'] { font-family: 'Noto Sans Arabic', Tahoma, sans-serif; font-size: 14.5px; line-height: 1.9; }
.xb-post-title { margin: 0 0 10px; color: #0b3f99; font: bold 22px/1.3 var(--display); }
.xb-post[dir='rtl'] .xb-post-title { font-family: 'Noto Sans Arabic', Tahoma, sans-serif; }
.xb-post-title a, .xb-post-title a:visited { color: #0b3f99; text-decoration: none; }
.xb-post-title a:hover { color: #e06a00; text-decoration: underline; }
h1.xb-post-title { font-size: 26px; }
.xb-cover { margin: 0 0 14px; }
.xb-cover img, .xb-body img { display: block; margin: 0 auto; padding: 4px; border: 1px solid #ccc; background: #fff; box-shadow: 1px 1px 3px rgba(0, 0, 0, .15); }
.xb-body { overflow-wrap: anywhere; }
.xb-body h2 { margin: 1.4em 0 .5em; color: #0b3f99; font: bold 19px/1.3 var(--display); }
.xb-body h3, .xb-body h4 { margin: 1.2em 0 .4em; color: #333; font: bold 16px/1.3 var(--display); }
.xb-post[dir='rtl'] .xb-body :is(h2, h3, h4) { font-family: 'Noto Sans Arabic', Tahoma, sans-serif; }
.xb-body p { margin: 0 0 1em; }
.xb-body figure { margin: 1.2em 0; text-align: center; }
.xb-body figcaption { margin-top: 4px; color: var(--muted); font-size: 12px; font-style: italic; }
.xb-body blockquote {
  margin: 1em 0;
  padding: 8px 14px;
  border-inline-start: 4px solid #9db9eb;
  background: #f1f5fd;
  color: #333;
}
.xb-body blockquote p:last-child { margin-bottom: 0; }
.xb-body code { padding: 0 3px; border: 1px solid #e0e0e0; background: #f6f6f6; font: 12.5px 'Lucida Console', Consolas, monospace; }
.xb-body pre {
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #000;
  color: #c0c0c0;
  direction: ltr;
  text-align: left;
}
.xb-body pre code { padding: 0; border: 0; background: none; color: inherit; }
.xb-body hr { border: 0; border-top: 1px dotted #999; margin: 1.5em 0; }
.xb-body ul, .xb-body ol { padding-inline-start: 1.6em; }
.xb-more { font-weight: bold; }
.xb-post-foot {
  margin-top: 10px;
  padding: 6px 10px;
  border: 1px solid #dfe5f2;
  background: #f5f8fe;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}
.xb-post-foot p { margin: 0; }
.xb-updated { font-style: italic; }
.xb-notice { margin: 0 0 16px; padding: 7px 10px; border: 1px solid #e3c55b; background: #ffffe1; }
.xb-empty { padding: 30px 0; color: var(--muted); text-align: center; }
.xb-pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px dotted #b7c4de; font-weight: bold; }
.xb-pager > :first-child { justify-self: start; }
.xb-pager > :last-child { justify-self: end; }

/* ---------- Sidebar: boxes like XP's task pane ---------- */
.xb-side { display: flex; flex-direction: column; gap: 12px; font-size: 12px; }
.xb-box { overflow: hidden; border-radius: 3px 3px 0 0; background: var(--pane); }
.xb-box h2 {
  margin: 0;
  padding: 4px 10px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #fff, #c6d3f7);
  color: var(--blue);
  font: bold 12px var(--font);
}
.xb-box > :not(h2) { margin: 0; padding: 8px 10px; }
.xb-box ul { margin: 0; padding: 8px 10px 8px 24px; }
.xb-box li { margin: 2px 0; }
.xb-me img { float: left; margin: 0 8px 4px 0; padding: 2px; border: 1px solid #9aa9c7; background: #fff; }
.xb-me p { margin: 0 0 6px; }
.xb-me::after { content: ''; display: block; clear: both; }
.xb-archive details { margin: 2px 0; }
.xb-archive details details { margin-inline-start: 14px; }
.xb-archive summary { cursor: pointer; color: var(--link); }
.xb-archive ul { padding: 2px 0 2px 26px; }
.xb-count { color: var(--muted); }
.xb-labels { columns: 1; }

.xb-footer { padding: 14px; color: #3a4a6b; font-size: 11.5px; text-align: center; }
.xb-footer a { color: #0b3f99; }

/* ---------- Narrow screens (phones, small windows inside the OS) ---------- */
@media (max-width: 760px) {
  .xb-page { margin-top: 10px; padding: 0 8px; }
  .xb-cols { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .xb-header { padding: 18px 16px 16px; }
  .xb-title { font-size: 24px; }
  .xb-navbar { flex-wrap: wrap; gap: 6px 10px; }
  .xb-search { order: 3; width: 100%; margin-inline-start: 0; }
  .xb-search input { flex: 1; width: auto; min-width: 0; }
  .xb-back { margin-inline-start: auto; }
  h1.xb-post-title { font-size: 22px; }
}
