/* ==========================================================
   حاتم محمد — dark site styles
   Font: Thmanyah Sans (put files in /assets/fonts — see README)
   ========================================================== */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap");

@font-face { font-family: "Thmanyah Sans"; font-weight: 300; font-display: swap;
  src: local("Thmanyah Sans Light"), url("/assets/fonts/thmanyahsans-Light.woff2") format("woff2"), url("/assets/fonts/thmanyahsans-Light.otf") format("opentype"); }
@font-face { font-family: "Thmanyah Sans"; font-weight: 400; font-display: swap;
  src: local("Thmanyah Sans"), local("Thmanyah Sans Regular"), url("/assets/fonts/thmanyahsans-Regular.woff2") format("woff2"), url("/assets/fonts/thmanyahsans-Regular.otf") format("opentype"); }
@font-face { font-family: "Thmanyah Sans"; font-weight: 500; font-display: swap;
  src: local("Thmanyah Sans Medium"), url("/assets/fonts/thmanyahsans-Medium.woff2") format("woff2"), url("/assets/fonts/thmanyahsans-Medium.otf") format("opentype"); }
@font-face { font-family: "Thmanyah Sans"; font-weight: 700; font-display: swap;
  src: local("Thmanyah Sans Bold"), url("/assets/fonts/thmanyahsans-Bold.woff2") format("woff2"), url("/assets/fonts/thmanyahsans-Bold.otf") format("opentype"); }

:root {
  --bg: #141414;
  --surface: #1b1b1b;
  --raised: #222222;
  --muted: #2a2a2a;
  --line: #2f2f2f;
  --line-2: #3d3d3d;
  --text: #f5f5f4;
  --text-2: #bdbdba;
  --text-3: #8f8f8c;
  --accent: #8db4ef;
  --accent-ink: #0f1a2b;
  --accent-soft: #1b2738;
  --blue: #8db4ef;   --blue-soft: #1b2738;
  --green: #7fcfae;  --green-soft: #15291f;
  --yellow: #e8c75a; --yellow-soft: #2b2512;
  --purple: #b9a5f0; --purple-soft: #241f38;
  --orange: #f0a07c; --orange-soft: #33201a;
  --pink: #f0a3c4;   --pink-soft: #33192a;
  --radius: 18px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font: "Thmanyah Sans", "IBM Plex Sans Arabic", "SF Arabic", "Geeza Pro", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.8;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.ph { line-height: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; top: -60px; right: 16px; z-index: 50; padding: 8px 14px; border-radius: 10px; background: var(--text); color: var(--bg); }
.skip:focus { top: 12px; }

/* ---------- shell ---------- */
.shell { display: flex; gap: 64px; max-width: 1080px; margin: 0 auto; padding: 40px 24px 0; }
.sidebar { position: sticky; top: 40px; align-self: flex-start; width: 208px; flex: none; display: flex; flex-direction: column; gap: 28px; }
.main { flex: 1; min-width: 0; max-width: 640px; padding-bottom: 96px; }

.me { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; object-position: center 20%; background: var(--muted); }
.me b { display: block; font-size: 15px; font-weight: 500; line-height: 1.4; }
.me small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.4; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; margin: 0; border: 0; border-radius: 10px; background: none; cursor: pointer;
  color: var(--text-2); font-size: 15px; text-align: start;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav .ph { font-size: 18px; color: var(--text-3); transition: color .2s; }
.nav a:hover, .nav button:hover { background: var(--surface); color: var(--text); }
.nav a:hover .ph, .nav button:hover .ph { color: var(--text); }
.nav a[aria-current="page"] { background: var(--raised); color: var(--text); font-weight: 500; }
.nav a[aria-current="page"] .ph { color: var(--accent); }
.nav kbd { margin-inline-start: auto; }
kbd { font-family: inherit; font-size: 11px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--text-3); direction: ltr; }

.side-card { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.side-card strong { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.side-card p { margin: 4px 0 12px; color: var(--text-3); line-height: 1.6; font-size: 13px; }
.socials { display: flex; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: none; cursor: pointer;
  display: inline-grid; place-items: center; color: var(--text-2); font-size: 18px; transition: background .2s, color .2s;
}
.icon-btn:hover { background: var(--raised); color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  min-height: 40px; padding: 8px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500;
  transition: opacity .2s, transform .2s var(--ease), background .2s;
}
.btn .ph { font-size: 17px; }
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--raised); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--muted); opacity: 1; }
.btn.small { min-height: 34px; padding: 6px 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: progress; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- topline ---------- */
.topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.topline p { margin: 0; font-size: 15px; color: var(--text-2); line-height: 1.75; }
.topline b { color: var(--text); font-weight: 500; }
.meta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--text-3); }
.meta-row b { color: var(--text); font-weight: 500; }
.pill-link { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); transition: background .2s; }
.pill-link:hover { background: var(--surface); color: var(--text); }
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(127,207,174,.18); flex: none; }
hr.rule { border: 0; border-top: 1px solid var(--line); margin: 28px 0 40px; }

/* ---------- sections ---------- */
.section { margin-top: 80px; scroll-margin-top: 40px; }
.section.first { margin-top: 0; }
.label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin: 0 0 16px; }
.label .ph { font-size: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head .label { margin: 0; }
.more { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); }
.more:hover { color: var(--text); }
h1, h2, h3, h4 { margin: 0; letter-spacing: 0; }
.page-title { font-size: 38px; line-height: 1.35; font-weight: 700; margin-bottom: 14px; }
.lead { font-size: 18px; color: var(--text-2); margin: 0; line-height: 1.85; }
.h2 { font-size: 24px; font-weight: 700; line-height: 1.45; margin-bottom: 12px; }

/* ---------- media ---------- */
.media { position: relative; overflow: hidden; background: var(--raised); border-radius: var(--radius); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .4s; }
.media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); pointer-events: none; }
a:hover > .media img, a:hover .media img { transform: scale(1.035); }
.media.dim img { filter: brightness(.86) saturate(.92); }

/* pinned feature */
.feature { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 22px; }
.feature .media { position: absolute; inset: 0; border-radius: 22px; }
.feature .media img { object-position: center 40%; }
.feature .media::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 45%); }
.pin { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(20,20,20,.6); backdrop-filter: blur(10px); font-size: 12px; color: var(--text-2); }
.feature-bar {
  position: absolute; inset-inline: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: 14px; background: rgba(20,20,20,.62); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.08);
}
.feature-bar h2 { font-size: 17px; font-weight: 500; line-height: 1.5; }
.circle { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--text); color: var(--bg); font-size: 16px; transition: transform .3s var(--ease); }
.feature:hover .circle { transform: rotate(-45deg); }

/* cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; }
.card .media { aspect-ratio: 4 / 3; border-radius: 14px; }
.card small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.card h3 { font-size: 15px; font-weight: 500; line-height: 1.6; }
.card:hover h3 { color: #fff; }

/* link list */
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list a { display: flex; align-items: center; gap: 12px; padding: 12px; margin-inline: -12px; border-radius: 12px; font-size: 15px; transition: background .2s; }
.link-list a:hover { background: var(--surface); }
.link-list .ic { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--raised); color: var(--accent); font-size: 18px; }
.link-list .txt { flex: 1; }
.link-list .go { color: var(--text-3); transition: transform .2s var(--ease), color .2s; }
.link-list a:hover .go { transform: translateX(-4px); color: var(--text); }
.link-list small { display: block; font-size: 12px; color: var(--text-3); }

/* chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: none; cursor: pointer; font-size: 13px; color: var(--text-2); transition: background .2s, color .2s, border-color .2s; }
.chip:hover { background: var(--surface); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip .n { font-size: 11px; opacity: .7; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; display: inline-block; }

/* post rows */
.posts { list-style: none; margin: 0; padding: 0; }
.post a { display: flex; align-items: center; gap: 16px; padding: 12px; margin-inline: -12px; border-radius: 14px; transition: background .2s; }
.post a:hover { background: var(--surface); }
.post .media { width: 88px; height: 64px; border-radius: 10px; flex: none; }
.post .txt { flex: 1; min-width: 0; }
.post .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.post h3 { font-size: 16px; font-weight: 500; line-height: 1.6; margin-top: 2px; }
.post .go { color: var(--text-3); font-size: 16px; transition: transform .2s var(--ease); }
.post a:hover .go { transform: translateX(-4px); color: var(--text); }
.empty { padding: 28px 0; color: var(--text-3); font-size: 14px; text-align: center; }

/* article grid */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 20px; list-style: none; margin: 0; padding: 0; }
.grid-2 .card .media { aspect-ratio: 16 / 10; }
.grid-2 .card h3 { font-size: 17px; }
.search-field { position: relative; margin-bottom: 16px; }
.search-field .ph { position: absolute; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: var(--text-3); font-size: 18px; pointer-events: none; }
.search-field .input { padding-inline-start: 44px; border-radius: 999px; }

/* services */
.services { display: flex; flex-direction: column; gap: 12px; }
.service { display: grid; grid-template-columns: 184px 1fr; gap: 20px; padding: 12px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: background .25s, border-color .25s; }
.service:hover { background: var(--raised); border-color: var(--line-2); }
.service .media { border-radius: 12px; min-height: 140px; }
.service .body { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 6px 6px; }
.service .top { display: flex; align-items: center; gap: 8px; }
.badge { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; flex: none; }
.service h3 { font-size: 17px; font-weight: 700; }
.service p { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.8; }
.service .foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.service .foot span:last-child { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--raised); color: var(--text-2); border: 1px solid var(--line); }
.tag .ph { font-size: 13px; }

/* colour helpers */
.c-blue { --c: var(--blue); --cs: var(--blue-soft); }
.c-green { --c: var(--green); --cs: var(--green-soft); }
.c-yellow { --c: var(--yellow); --cs: var(--yellow-soft); }
.c-purple { --c: var(--purple); --cs: var(--purple-soft); }
.c-orange { --c: var(--orange); --cs: var(--orange-soft); }
.c-pink { --c: var(--pink); --cs: var(--pink-soft); }
.badge, .tinted { background: var(--cs, var(--raised)); color: var(--c, var(--text)); }
.dot { background: var(--c, var(--text-3)); }

/* newsletter */
.news { display: grid; grid-template-columns: 1fr 200px; gap: 0; border-radius: 22px; overflow: hidden; background: var(--accent-soft); border: 1px solid #263650; }
.news .media { border-radius: 0; order: 2; min-height: 100%; }
.news .media::after { display: none; }
.news .body { padding: 28px; }
.news h3 { display: flex; align-items: center; gap: 8px; font-size: 20px; margin-bottom: 6px; }
.news p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; }
.news-form { display: flex; gap: 8px; }
.news-form .input { background: var(--bg); border-radius: 999px; }
.form-note { font-size: 13px; min-height: 22px; margin: 10px 0 0; color: var(--green); }
.form-note.err { color: var(--orange); }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.input, .textarea, .select { width: 100%; min-height: 46px; padding: 11px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface); font-size: 15px; transition: border-color .2s, background .2s; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--accent); background: var(--raised); }
.textarea { min-height: 140px; resize: vertical; }
.ltr { direction: ltr; text-align: right; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* about */
.about-blurb { display: flex; gap: 16px; align-items: center; }
.about-blurb .media { width: 72px; height: 72px; border-radius: 18px; flex: none; }
.about-blurb p { margin: 0; color: var(--text-2); }
.prose p { margin: 0 0 16px; color: var(--text-2); }
.prose p:first-child { color: var(--text); font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat { padding: 18px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 28px; font-weight: 700; line-height: 1.2; direction: ltr; text-align: right; }
.stat span { display: block; margin-top: 6px; font-size: 12px; color: var(--text-3); line-height: 1.6; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tile { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.tile .badge { margin-bottom: 12px; }
.tile h3 { font-size: 15px; font-weight: 600; }
.tile p { margin: 4px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.tile small { display: block; font-size: 12px; color: var(--text-3); direction: ltr; text-align: right; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; inset-inline-start: 5px; width: 1px; background: var(--line-2); }
.timeline li { position: relative; padding-inline-start: 32px; padding-bottom: 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--c, var(--text-3)); }
.timeline .when { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-3); }
.timeline h3 { font-size: 16px; font-weight: 600; margin-top: 2px; }
.timeline .role { font-size: 13px; color: var(--text-3); direction: ltr; text-align: right; }
.timeline p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.kind { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--cs, var(--raised)); color: var(--c, var(--text-2)); }

.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; gap: 14px; padding: 16px 0; border-top: 1px solid var(--line); }
.list-plain li:first-child { border-top: 0; padding-top: 0; }
.list-plain .num { font-size: 13px; color: var(--accent); font-weight: 600; min-width: 22px; padding-top: 2px; }
.list-plain h3 { font-size: 16px; font-weight: 600; }
.list-plain small { color: var(--text-3); font-size: 12px; }
.list-plain p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.photo-split { display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start; }
.photo-split figure { margin: 0; }
.photo-split .media { aspect-ratio: 4 / 5; }
.photo-split .media img { object-position: center 18%; }
.photo-split figcaption { font-size: 13px; color: var(--text-3); margin-top: 10px; line-height: 1.7; }
.wide-photo { aspect-ratio: 21 / 9; }

/* steps + tables + faq */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; margin-bottom: 10px; background: var(--cs, var(--accent-soft)); color: var(--c, var(--accent)); font-size: 13px; font-weight: 700; }
.steps h3 { font-size: 15px; }
.steps p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); line-height: 1.75; }
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fit > div { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.fit h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 8px; }
.fit ul { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--text-2); }
.fit li { display: flex; gap: 8px; padding: 4px 0; }
.fit li .ph { margin-top: 5px; flex: none; }
.ok { color: var(--green); } .no { color: var(--orange); }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { padding: 12px 14px; text-align: right; border-top: 1px solid var(--line); vertical-align: top; }
table.t thead th { border-top: 0; background: var(--surface); font-weight: 600; }
table.t tbody th { font-weight: 500; color: var(--text-3); white-space: nowrap; }
table.t td { color: var(--text-2); }
table.t td:first-child { color: var(--text); }
.compare { min-width: 600px; font-size: 13px; }
details.faq { border-top: 1px solid var(--line); }
details.faq:last-child { border-bottom: 1px solid var(--line); }
details.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; font-weight: 500; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary .ph { color: var(--text-3); transition: transform .25s var(--ease); flex: none; }
details.faq[open] summary .ph { transform: rotate(45deg); }
details.faq p { margin: 0 0 16px; color: var(--text-2); font-size: 15px; }
.price { font-size: 26px; font-weight: 700; }
.cta-card { padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.cta-card h2 { font-size: 22px; margin-bottom: 6px; }
.cta-card p { margin: 0 0 18px; color: var(--text-2); }

/* service page header */
.hero-media { aspect-ratio: 16 / 9; border-radius: 22px; margin-bottom: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); margin-bottom: 10px; }
.en { direction: ltr; display: inline-block; }

/* article */
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); margin-bottom: 24px; }
.back:hover { color: var(--text); }
.article-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); margin-top: 6px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-title { font-size: 36px; line-height: 1.45; font-weight: 700; margin: 14px 0 6px; }
.article-cover { aspect-ratio: 16 / 9; border-radius: 22px; margin: 28px 0 8px; }
.toc { margin: 28px 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.toc summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-size: 14px; font-weight: 500; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary .ph:last-child { margin-inline-start: auto; transition: transform .25s; color: var(--text-3); }
.toc[open] summary .ph:last-child { transform: rotate(180deg); }
.toc ol { margin: 0; padding: 0 18px 14px; list-style: none; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: 10px; padding: 6px 0; font-size: 14px; color: var(--text-2); }
.toc a::before { content: counter(t); color: var(--text-3); font-size: 12px; min-width: 16px; padding-top: 2px; }
.toc a:hover { color: var(--text); }
.article-body { font-size: 18px; line-height: 2; color: #dcdcd9; }
.article-body > * + * { margin-top: 1.1em; }
.article-body p { margin: 0; }
.article-body h2 { font-size: 24px; line-height: 1.5; color: var(--text); margin-top: 2em; scroll-margin-top: 24px; }
.article-body h3 { font-size: 20px; color: var(--text); margin-top: 1.6em; }
.article-body strong { color: var(--text); font-weight: 700; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.article-body ul, .article-body ol { margin: 0; padding-inline-start: 1.4em; }
.article-body li + li { margin-top: .4em; }
.article-body li::marker { color: var(--text-3); }
.article-body blockquote { margin: 0; padding: 4px 18px; border-inline-start: 3px solid var(--accent); color: var(--text); }
.article-body img { border-radius: 16px; }
.article-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.7; display: block; overflow-x: auto; }
.article-body th, .article-body td { padding: 10px 12px; border: 1px solid var(--line); text-align: right; }
.article-body th { background: var(--surface); color: var(--text); }
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.share span { margin-inline-end: 4px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.pager a { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: background .2s; }
.pager a:hover { background: var(--raised); }
.pager small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); }
.pager b { display: block; font-size: 14px; font-weight: 500; margin-top: 4px; line-height: 1.6; }
.pager .next { text-align: left; }
.pager .next small { justify-content: flex-end; }
.progress { position: fixed; top: 0; right: 0; height: 3px; width: 0; z-index: 40; background: var(--accent); transition: width .1s linear; }

/* experiments */
.hypo { margin-top: 28px; padding: 20px 22px; border-radius: 18px; background: var(--accent-soft); border: 1px solid #263650; }
.hypo .label { margin-bottom: 6px; color: var(--accent); }
.hypo p:last-child { margin: 0; font-size: 18px; line-height: 1.85; color: var(--text); }
.tag.draft { border-style: dashed; color: var(--yellow); }
.card .tags { margin-top: 2px; }

/* workflows: mini strip on cards */
.flow-strip { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fs-node { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); color: var(--text-2); font-size: 14px; }
.fs-node.start { background: var(--accent-soft); border-color: #263650; color: var(--accent); }
.flow-strip .sep { color: var(--text-3); font-size: 12px; }

/* workflows: full diagram */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: stretch; }
.flow-node { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.flow-node .fn-icon { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line-2); color: var(--text); font-size: 20px; }
.flow-node.trigger { border-color: #263650; background: var(--accent-soft); }
.flow-node.trigger .fn-icon { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.flow-node.result { border-color: #1f3d30; background: var(--green-soft); }
.flow-node.result .fn-icon { background: var(--green); color: #0d1f17; border-color: transparent; }
.fn-body small { display: block; font-size: 12px; color: var(--text-3); }
.fn-body small b { color: var(--text-2); font-weight: 500; }
.fn-body h3 { font-size: 16px; font-weight: 600; line-height: 1.6; }
.fn-body p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.75; }
.flow-link { display: flex; justify-content: flex-start; padding: 4px 0 4px 0; padding-inline-start: 28px; color: var(--text-3); font-size: 18px; position: relative; }
.flow-link::before { content: ""; position: absolute; inset-inline-start: 38px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.flow-link .ph { position: relative; background: var(--bg); padding: 2px 0; }

/* contact */
.booking { display: grid; grid-template-columns: 140px 1fr; gap: 20px; padding: 12px; border-radius: 20px; background: var(--accent-soft); border: 1px solid #263650; }
.booking .media { border-radius: 12px; min-height: 120px; }
.booking .body { padding: 8px 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.booking h3 { font-size: 18px; }
.booking p { margin: 0; color: var(--text-2); font-size: 14px; }
.contact-lines { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; font-size: 14px; }
.contact-lines a { display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.contact-lines a:hover { color: var(--text); }
.contact-lines .ph { font-size: 18px; color: var(--text-3); }

/* footer */
.footer { margin-top: 96px; padding: 28px 0 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-3); }
.footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--text); }

/* floating pill */
.float-pill { position: fixed; bottom: 20px; left: 20px; z-index: 20; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: 13px; font-weight: 500; transition: transform .3s var(--ease), opacity .3s; }
.float-pill .ph { font-size: 16px; color: var(--accent); }
.float-pill:hover { transform: translateY(-2px); }
.float-pill.hide { opacity: 0; transform: translateY(20px); pointer-events: none; }

/* search dialog */
dialog.search { width: min(580px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 20px; background: var(--surface); color: var(--text); margin-top: 12vh; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
dialog.search::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); }
.search .bar { display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.search .bar .ph { color: var(--text-3); font-size: 20px; }
.search input { flex: 1; border: 0; padding: 18px 0; font-size: 16px; background: none; outline: none; }
.search ul { list-style: none; margin: 0; padding: 8px; max-height: 52vh; overflow: auto; }
.search li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; font-size: 15px; }
.search li a .ph { color: var(--text-3); font-size: 18px; }
.search li a small { margin-inline-start: auto; color: var(--text-3); font-size: 12px; }
.search li a:hover, .search li a.active { background: var(--raised); }
.search .hint { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-3); display: flex; gap: 14px; }

/* mobile */
.mobile-bar, .mobile-nav { display: none; }

/* reveal + skeleton */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.skeleton { min-height: 60vh; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .media img, .circle, .go { transition: none !important; }
}

@media (max-width: 900px) {
  .shell { display: block; padding: 0 16px; }
  .sidebar { display: none; }
  .main { max-width: none; }
  #mobile-bar { position: sticky; top: 0; z-index: 30; margin: 0 -16px 24px; padding: 0 16px; background: rgba(20,20,20,.97); border-bottom: 1px solid var(--line); } /* no backdrop-filter: it would trap the fixed menu */
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
  .mobile-bar .avatar { width: 36px; height: 36px; border-radius: 10px; }
  .mobile-bar .acts { display: flex; gap: 6px; }
  .mobile-nav { position: fixed; inset: 61px 0 0; z-index: 29; padding: 8px 16px 24px; background: var(--bg); flex-direction: column; overflow: auto; }
  .mobile-nav.open { display: flex; }
  .mobile-nav a { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
  .mobile-nav a .ph { font-size: 20px; color: var(--text-3); }
  .mobile-nav a[aria-current="page"] { color: var(--accent); }
  .mobile-nav .btn { margin-top: 20px; }
  .topline .btn { display: none; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .cards-3 > :nth-child(3) { display: none; }
  .float-pill { bottom: 16px; left: 16px; }
}
@media (max-width: 560px) {
  .page-title, .article-title { font-size: 29px; }
  .article-body { font-size: 17px; }
  .service, .booking { grid-template-columns: 1fr; }
  .service .media, .booking .media { min-height: 0; aspect-ratio: 16 / 8; }
  .service .body, .booking .body { padding: 4px; }
  .news { grid-template-columns: 1fr; }
  .news .media { order: -1; aspect-ratio: 16 / 7; }
  .news .body { padding: 22px; }
  .news-form { flex-direction: column; }
  .stats, .tiles, .steps, .fit, .row-2, .grid-2, .pager { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .photo-split { grid-template-columns: 1fr; }
  .photo-split .media { aspect-ratio: 1; }
  .feature { aspect-ratio: 4 / 5; }
  .post .media { width: 72px; height: 56px; }
  .pager .next { text-align: right; }
  .pager .next small { justify-content: flex-start; }
}
