:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f2f7f4;
  --tint: #e8f1ec;
  --border: #d9e4de;
  --text: #12261f;
  --text-2: #4c5f58;
  --accent: #0c6a50;
  --accent-hover: #09543f;
  --on-accent: #ffffff;
  --link: var(--accent);
  --btn-bg: var(--accent);
  --btn-hover: var(--accent-hover);
  --btn-text: var(--on-accent);
  /* Text in Readex Pro, headings in Fustat; both cover Arabic and Latin. */
  --font-ar: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-en: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  --head-ar: "Fustat", "Readex Pro", system-ui, sans-serif;
  --head-en: "Fustat", "Readex Pro", system-ui, sans-serif;
  --ui-ar: var(--font-ar);
  --ui-en: var(--font-en);
  --head-weight: 700;
  --body-size: 17px;
  /* The dark band at the foot of every page */
  --ink: #0b2a21;
  --ink-line: #23493d;
  --on-ink: #eef5f1;
  --on-ink-2: #a8c3b8;
  /* Chat bubbles */
  --bubble-in: #ffffff;
  --bubble-out: #d7ecdf;
  --bubble-out-line: #c2dfcf;
  --shadow: rgba(11, 42, 33, .45);
  /* Motion: one curve and three speeds for the whole site */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --fast: .18s;
  --mid: .4s;
  --slow: .8s;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-tap-highlight-color: transparent; }
a:active { opacity: .7; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: var(--body-size);
  line-height: 1.8;
}
html[lang="en"] body { font-family: var(--font-en); line-height: 1.6; }
h1, h2, h3, .brand, .spec dt { font-family: var(--head-ar); }
html[lang="en"] :is(h1, h2, h3, .brand, .spec dt) { font-family: var(--head-en); }
.btn, .nav-links, .lang-btn, .facts dt { font-family: var(--ui-ar); }
html[lang="en"] :is(.btn, .nav-links, .lang-btn, .facts dt) { font-family: var(--ui-en); }
a { color: var(--link); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 760px; }
@media (max-width: 480px) { .container { padding-inline: 16px; } }

/* Night mode: follows the device until the visitor picks one with the switch in the header. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  color-scheme: dark;
    --bg: #0f1a16;
    --surface: #15241e;
    --tint: #1b2d26;
    --border: #293d34;
    --text: #e4eee8;
    --text-2: #9fb5aa;
    --accent: #5cc79f;
    --accent-hover: #7fd6b5;
    --on-accent: #07211a;
    --ink: #0a1411;
    --ink-line: #22362e;
    --on-ink: #e4eee8;
    --on-ink-2: #9fb5aa;
    --bubble-in: #1c2f27;
    --bubble-out: #1f4a3b;
    --bubble-out-line: #2a5c4a;
    --shadow: rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1a16;
  --surface: #15241e;
  --tint: #1b2d26;
  --border: #293d34;
  --text: #e4eee8;
  --text-2: #9fb5aa;
  --accent: #5cc79f;
  --accent-hover: #7fd6b5;
  --on-accent: #07211a;
  --ink: #0a1411;
  --ink-line: #22362e;
  --on-ink: #e4eee8;
  --on-ink-2: #9fb5aa;
  --bubble-in: #1c2f27;
  --bubble-out: #1f4a3b;
  --bubble-out-line: #2a5c4a;
  --shadow: rgba(0, 0, 0, .6);
}
:root[data-theme="light"] { color-scheme: light; }

/* Arabic shows by default and without JavaScript. */
[data-lang="en"] { display: none; }
html[lang="en"] [data-lang="ar"] { display: none; }
html[lang="en"] [data-lang="en"] { display: revert; }
[hidden] { display: none !important; }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 20; }
.skip:focus { inset-inline-start: 8px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 10; view-transition-name: site-header;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color var(--mid) ease;
}
header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { font-weight: 600; font-size: 18px; color: var(--text); text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a, .lang-btn {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--text-2); text-decoration: none; font-size: 15px; border-radius: 8px;
  transition: color var(--fast) ease, background-color var(--fast) ease, border-color var(--fast) ease;
}
.nav-links a:hover, .nav-links a.current { color: var(--text); }
/* The line under a menu link: grows on hover, stays under the section being read. */
.nav-links a::after {
  content: ""; position: absolute; inset-inline: 12px; bottom: 8px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform var(--mid) var(--ease);
}
.nav-links a:hover::after, .nav-links a.current::after { transform: scaleX(1); }
.lang-btn:hover { color: var(--text); background: var(--tint); border-color: var(--text-2); }
.lang-btn { border: 1px solid var(--border); background: transparent; font: inherit; font-size: 15px; cursor: pointer; margin-inline-start: 8px; }
@media (max-width: 720px) { .nav-links a { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 8px; font-weight: 500; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--fast) ease, border-color var(--fast) ease, color var(--fast) ease, transform var(--fast) var(--ease), box-shadow var(--mid) var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-primary:hover { box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); border: 1px solid var(--btn-bg); }
.btn-primary:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--text-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 88px) 56px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: center; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 40px; } }
h1 { font-size: clamp(31px, 4.7vw, 54px); line-height: 1.32; font-weight: 600; margin: 0 0 20px; text-wrap: balance; }
html[lang="en"] h1 { letter-spacing: -0.025em; line-height: 1.08; }
.case-hero h1, .doc h1 { font-size: clamp(30px, 4.4vw, 44px); }

/* The one page-load moment: the hero's lines rise in turn, then the chat starts. */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.js .hero-copy > *, .js .case-hero > div:first-child > *, .js .chat-wrap, .js .hero-facts { animation: rise var(--slow) var(--ease) both; }
.js .hero-copy > :nth-child(2), .js .case-hero > div:first-child > :nth-child(2) { animation-delay: .08s; }
.js .hero-copy > :nth-child(3), .js .case-hero > div:first-child > :nth-child(3) { animation-delay: .16s; }
.js .hero-copy > :nth-child(4), .js .case-hero > div:first-child > :nth-child(4) { animation-delay: .24s; }
.js .case-hero > div:first-child > :nth-child(5) { animation-delay: .32s; }
.js .chat-wrap { animation-delay: .28s; }
.js .hero-facts { animation-delay: .4s; }
.intro { font-size: 19px; color: var(--text-2); margin: 0 0 32px; max-width: 36em; }

.facts { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 8px 24px; margin: 0; }
.facts div { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; padding-block: 14px; border-top: 1px solid var(--border); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--text-2); font-size: 15px; }
.facts dd { margin: 0; font-size: 15.5px; overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .facts { padding: 4px 20px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; padding-block: 12px; }
}

/* Home: the facts sit in one row under the hero */
.hero-facts { margin-bottom: 72px; }
.hero-facts .facts { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 0 32px; background: none; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 0; }
.hero-facts .facts div { display: block; border: 0; padding-block: 18px 0; }
.hero-facts .facts dt { font-size: 14px; margin-bottom: 2px; }
@media (max-width: 880px) {
  .hero-facts { margin-bottom: 56px; }
  .hero-facts .facts { display: block; }
  .hero-facts .facts div { display: grid; grid-template-columns: 5.5em 1fr; gap: 16px; padding-block: 13px; border-top: 1px solid var(--border); }
  .hero-facts .facts div:first-child { border-top: 0; }
  .hero-facts .facts dt { font-size: 15px; margin: 0; }
}

/* The chat in the hero: a short example that plays once, then waits for the visitor's press. */
.chat { border: 1px solid var(--border); border-radius: 20px; background: var(--surface); overflow: hidden; box-shadow: 0 30px 60px -40px var(--shadow); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; background: var(--bg); border-bottom: 1px solid var(--border); }
.chat-head b { display: block; font-weight: 600; font-size: 16px; line-height: 1.4; }
.chat-head span { color: var(--text-2); font-size: 13.5px; }
.chat-replay { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin: -6px; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--mid) ease, visibility 0s linear var(--mid), color var(--fast) ease, background-color var(--fast) ease, transform var(--slow) var(--ease); }
.chat-replay.on { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.chat-replay:hover { color: var(--text); background: var(--tint); transform: rotate(-200deg); }
.chat-replay svg { width: 18px; height: 18px; }
.chat-body { height: 468px; padding: 16px 16px 18px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; -webkit-mask-image: linear-gradient(#0000, #000 44px); mask-image: linear-gradient(#0000, #000 44px); }
/* Each message opens its own row, so the earlier ones glide up instead of jumping. */
.msg { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); flex: none; }
.msg.in { grid-template-rows: 1fr; }
.msg > div { min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; }
.msg.out > div { align-items: flex-end; }
.who { color: var(--text-2); font-size: 12.5px; margin: 10px 6px 3px; }
.bubble { max-width: 88%; padding: 9px 14px; border-radius: 16px; border-start-start-radius: 5px; background: var(--bubble-in); border: 1px solid var(--border); font-size: 15px; line-height: 1.65; opacity: 0; transform: translateY(10px) scale(.97); transform-origin: 0 100%; transition: opacity .35s ease .1s, transform .5s var(--ease) .1s; }
html[lang="en"] .bubble { line-height: 1.5; }
.msg.out .bubble { background: var(--bubble-out); border-color: var(--bubble-out-line); border-start-start-radius: 16px; border-start-end-radius: 5px; }
.msg.in .bubble { opacity: 1; transform: none; }
.bubble + .bubble { margin-top: 4px; }
.bubble + .chat-confirm { margin-top: 8px; }
.receipt { margin: 0; min-width: 232px; }
.receipt div { display: flex; justify-content: space-between; gap: 20px; }
.receipt dt, .receipt dd { margin: 0; }
.receipt dd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt .sum { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); font-weight: 600; }
.bubble p { margin: 0; }
.bubble .small { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.chat-confirm { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 88%; min-height: 48px; flex: none; border-radius: 12px; border: 1px solid var(--border); background: var(--bubble-in); color: var(--accent); font: inherit; font-weight: 600; font-size: 15.5px; cursor: pointer; transition: transform var(--fast) var(--ease), background-color var(--mid) ease, color var(--mid) ease, border-color var(--mid) ease; }
.chat-confirm svg { width: 19px; height: 19px; flex: none; display: none; }
@keyframes fade { from { opacity: 0; } }
.bubble.fresh > * { animation: fade .45s ease both; }
.chat-confirm:active { transform: scale(.97); }
.chat-confirm:disabled { background: var(--tint); border-color: var(--border); color: var(--text-2); cursor: default; }
/* While it waits for the visitor it is the one filled button in the chat: a hand taps on it
   and a soft ring breathes out around it. */
.chat-confirm.waiting { position: relative; background: var(--accent); border-color: var(--accent); color: var(--on-accent); animation: fade .45s ease both; }
.chat-confirm.waiting:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.chat-confirm.waiting svg { display: block; animation: tap 2.4s ease-in-out 1s infinite; }
.chat-confirm.waiting::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; border: 2px solid var(--accent); opacity: 0; pointer-events: none; animation: ring 2.4s cubic-bezier(.2, .6, .35, 1) 1s infinite; }
@keyframes ring { 0% { opacity: .55; inset: -1px; } 60%, 100% { opacity: 0; inset: -11px; border-radius: 22px; } }
@keyframes tap { 0%, 28%, 100% { transform: none; } 10% { transform: translateY(3px) scale(.9); } 18% { transform: none; } }
/* Once a message's row has opened it stops clipping, so the ring is never cut off. */
.msg.open > div { overflow: visible; }
.typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-2); opacity: .35; animation: dot 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { opacity: 1; transform: translateY(-3px); } 60% { opacity: .35; transform: none; } }

/* With motion turned off the whole chat is simply shown; without JavaScript the hero is text only. */
html:not(.js) :is(.chat-wrap, .theme-btn, .lang-btn) { display: none; }
html:not(.js) :is(.hero, .case-hero) { grid-template-columns: 1fr; }
.chat.still .chat-body { height: auto; -webkit-mask-image: none; mask-image: none; }
@media (max-width: 480px) { .chat-body { height: 440px; padding-inline: 12px; } .bubble { max-width: 92%; } .chat-confirm { width: 92%; } }

/* Sections */
section { position: relative; padding-block: 80px; }
@media (max-width: 880px) { section { padding-block: 56px; } }
/* The rule above each section is drawn across as the section comes into view. */
section::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 1px; background: var(--border); }
.js section::before { transform: scaleX(0); transform-origin: 100% 50%; transition: transform 1.1s var(--ease); }
html[dir="ltr"].js section::before { transform-origin: 0 50%; }
.js section.seen::before { transform: none; }
.js section > .container { opacity: 0; transition: opacity var(--slow) ease .1s; }
.js section.seen > .container { opacity: 1; }
h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.35; font-weight: 600; margin: 0 0 8px; }
html[lang="en"] h2 { letter-spacing: -0.01em; line-height: 1.25; }
.lead { color: var(--text-2); margin: 0 0 36px; max-width: 40em; }

/* Services: three plain columns, no boxes */
.plain-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 48px; }
@media (max-width: 880px) { .plain-3 { grid-template-columns: 1fr; } }
.item h3 { font-size: 19px; font-weight: 600; margin: 0 0 6px; }
.item p { margin: 0; color: var(--text-2); font-size: 16px; }

/* What every assistant includes: a spec list, in the facts box's language */
.spec { margin: 0; border-top: 1px solid var(--border); }
.spec > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 6px 48px; padding-block: 20px; border-bottom: 1px solid var(--border); }
.spec dt { font-weight: 600; font-size: 18px; transition: color var(--fast) ease; }
.spec > div:hover dt { color: var(--accent); }
.spec dd { margin: 0; color: var(--text-2); }
@media (max-width: 720px) { .spec > div { grid-template-columns: 1fr; } }

/* Work: one full-width row per project */
.work { display: grid; gap: 18px; }
.work-card {
  position: relative; display: block;
  padding: 34px 38px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  transition: transform var(--mid) var(--ease), border-color var(--mid) ease, box-shadow var(--mid) var(--ease);
}
/* The whole panel opens the project: the name's link is stretched over it. */
.work-body h3 a::before { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.work-links { position: relative; z-index: 1; }
@media (hover: hover) {
  .work-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: 0 24px 44px -30px var(--shadow); }
}
.work-card:has(.work-cover.missing) { grid-template-columns: 1fr; }
.work-cover { aspect-ratio: 4 / 3; background: var(--tint); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.work-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.work-cover.missing { display: none; }
.work-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; align-content: start; }
.work-body > * { grid-column: 1; }
.work-body > ul { grid-column: 2; grid-row: 1 / span 4; align-self: center; }
.work-kind { color: var(--text-2); font-size: 15px; margin: 0 0 2px; }
.work-body h3 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.3; font-weight: 600; margin: 0 0 8px; width: fit-content; }
.work-body h3 a { color: var(--text); text-decoration: none; transition: color var(--fast) ease; }
/* Pointing at a project: its name takes the accent and an arrow slides in beside it. */
.work-body h3 a::after {
  content: ""; display: inline-block; width: .62em; height: .62em; margin-inline-start: .4em;
  border-top: 2.5px solid currentColor; border-inline-start: 2.5px solid currentColor;
  transform: translateX(10px) rotate(-135deg); opacity: 0; transition: transform var(--mid) var(--ease), opacity var(--fast) ease;
}
html[dir="ltr"] .work-body h3 a::after { transform: translateX(-10px) rotate(135deg); }
.work-card:hover h3 a, .work-body h3 a:focus-visible { color: var(--accent); }
.work-card:hover h3 a::after, .work-body h3 a:focus-visible::after { opacity: 1; transform: rotate(-135deg); }
html[dir="ltr"] .work-card:hover h3 a::after, html[dir="ltr"] .work-body h3 a:focus-visible::after { transform: rotate(135deg); }
@media (hover: none) {
  .work-body h3 a::after { opacity: 1; transform: rotate(-135deg); color: var(--accent); }
  html[dir="ltr"] .work-body h3 a::after { transform: rotate(135deg); }
}
.work-body p { margin: 0 0 10px; color: var(--text-2); }
.work-body ul { margin: 0; padding-inline-start: 20px; }
.work-body li { margin-bottom: 6px; }
.work-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.work-links a, .others a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 100% calc(100% - 9px) / 0 1.5px no-repeat; transition: background-size var(--mid) var(--ease); }
html[dir="ltr"] :is(.work-links, .others) a { background-position-x: 0; }
.work-links a:hover, .others a:hover { background-size: 100% 1.5px; }
@media (max-width: 880px) {
  .work-card { grid-template-columns: 1fr; gap: 20px; padding: 24px 22px; }
  .work-body { grid-template-columns: 1fr; }
  .work-body > ul { grid-column: 1; grid-row: auto; margin-bottom: 10px; }
}
.note { margin: 24px 0 0; color: var(--text-2); font-size: 15px; }
.note b { color: var(--text); font-weight: 600; }

/* Contact band and footer: one dark block that closes every page */
#contact { background: var(--ink); color: var(--on-ink); padding-block: 88px; }
#contact::before { display: none; }
.contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; }
.contact h2 { max-width: 16em; margin: 0; font-size: clamp(28px, 4vw, 44px); line-height: 1.3; text-wrap: balance; }
html[lang="en"] .contact h2 { line-height: 1.12; letter-spacing: -0.02em; }
.contact p { margin: 0; color: var(--on-ink-2); }
#contact .btn-primary { background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); }
#contact .btn-primary:hover { background: color-mix(in srgb, var(--on-ink) 85%, var(--ink)); border-color: transparent; box-shadow: none; }
#contact .btn-secondary { background: transparent; border-color: var(--ink-line); color: var(--on-ink); }
#contact .btn-secondary:hover { border-color: var(--on-ink-2); }
#contact :focus-visible, footer :focus-visible { outline-color: var(--on-ink); }

footer { background: var(--ink); border-top: 1px solid var(--ink-line); padding-block: 14px 26px; color: var(--on-ink-2); font-size: 15px; }
footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
footer a { color: var(--on-ink-2); transition: color var(--fast) ease; }
footer a:hover { color: var(--on-ink); }
.brand, footer a { display: inline-flex; align-items: center; min-height: 44px; }

/* Case-study pages */
.crumb { padding-top: 28px; font-size: 15px; }
.crumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-2); text-decoration: none; }
.crumb a:hover { color: var(--text); }
.case-hero { padding-block: 20px 56px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 64px; align-items: center; }
@media (max-width: 880px) { .case-hero { grid-template-columns: 1fr; gap: 32px; padding-block: 12px 48px; } }
.case-kind { color: var(--text-2); margin: 0 0 6px; }
.demo-line { margin: 20px 0 0; color: var(--text-2); font-size: 15px; }
.demo-line b { color: var(--text); font-weight: 600; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }
.panel h2 { font-size: 22px; line-height: inherit; letter-spacing: 0; margin: 0 0 14px; }
html[lang="en"] .panel h2 { line-height: inherit; letter-spacing: 0; }
.panel ul { margin: 0; padding-inline-start: 20px; }
.panel li { margin-bottom: 10px; }
.panel li:last-child { margin-bottom: 0; }
.prose { max-width: 44em; margin-top: 20px; }
.prose p { margin: 0 0 12px; }
.prose p:last-child { margin-bottom: 0; }

/* Screenshots. Until a file exists in img/, its frame shows the file name (draft only). */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; }
@media (max-width: 720px) { .shots { grid-template-columns: 1fr; max-width: 320px; margin-inline: auto; } }
.shot { margin: 0; }
.shot img { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.shot figcaption { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.shot.wide { margin-top: 28px; }
.shot.wide a { display: block; border-radius: 10px; overflow: hidden; }
.shot.wide img { transition: transform var(--slow) var(--ease); }
.shot.wide a:hover img { transform: scale(1.015); }
.shot.missing img { display: none; }
.shot.missing::before {
  content: attr(data-file); display: flex; align-items: center; justify-content: center;
  aspect-ratio: 9 / 16; border: 1px dashed var(--text-2); border-radius: 12px; background: var(--tint);
  color: var(--text-2); font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; direction: ltr; padding: 12px; text-align: center;
}
.shot.wide.missing::before { aspect-ratio: 16 / 7; }

.others { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.others a { font-size: 19px; }

/* Privacy page */
.doc { padding-block: 48px 72px; }
.doc h1 { font-size: 34px; margin-bottom: 4px; }
.doc .updated { color: var(--text-2); font-size: 15px; margin: 0 0 28px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc h3 { font-size: 17px; font-weight: 600; margin: 20px 0 6px; }
.doc ul { padding-inline-start: 22px; margin: 0 0 12px; }
.doc li { margin-bottom: 6px; }
.callout { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 20px 0; }
.callout b { font-weight: 600; }
/* The "page not found" page */
.lost { min-height: calc(100vh - 150px); min-height: calc(100dvh - 150px); }
.lost p { color: var(--text-2); margin: 12px 0 28px; max-width: 34em; }

:is(h1, h2, h3, .brand, .spec dt) { font-weight: var(--head-weight); }

/* Moving between pages: the browser cross-fades them, the header stays put,
   and a project's name travels from its row on the home page to the top of its own page. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; animation-timing-function: var(--ease); }
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease); }
.vt-store { view-transition-name: project-store; }
.vt-clinic { view-transition-name: project-clinic; }
.vt-coach { view-transition-name: project-coach; }
.vt-store, .vt-clinic, .vt-coach { width: fit-content; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Under each chat */
.chat-note { margin: 12px 6px 0; color: var(--text-2); font-size: 14px; }
/* A photo the assistant sends, a file it sends, and the clinic's "booked" card */
.bubble.photo { margin: 4px 0 0; padding: 4px; width: min(232px, 72%); }
.bubble.photo img { width: 100%; height: auto; border-radius: 12px; background: var(--tint); }
.bubble.photo figcaption { padding: 6px 8px 2px; font-size: 13.5px; color: var(--text-2); }
.bubble.file { margin-top: 4px; display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 12px; }
.file-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--accent); color: var(--on-accent); }
.file-icon svg { width: 20px; height: 20px; }
.bubble.file b { display: block; font-weight: 600; font-size: 14px; }
.bubble.file .small { display: block; margin: 0; }
.bubble.card { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.bubble .ok { display: flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.bubble .ok svg { width: 18px; height: 18px; }
/* Project pages: three facts in a row with even gaps */
.hero-facts.few .facts { grid-template-columns: repeat(3, auto); justify-content: start; gap: 0 72px; }
.flow { margin-top: 0; }
/* A chat the visitor can scroll back through. The first message is pushed to the bottom
   with an auto margin (not flex-end), so the earliest ones stay reachable. */
.chat-body.scroll { overflow-y: auto; justify-content: flex-start; padding-top: 40px; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--border) transparent; -webkit-overflow-scrolling: touch; }
.chat-body.scroll > :first-child { margin-top: auto; }
.chat.still .chat-body.scroll { height: 468px; }
/* Room between a pressed button and the reply that follows it, and between bubbles from opposite sides */
.chat-confirm { margin-bottom: 8px; }
.msg.out + .msg:not(.out) > div, .msg:not(.out) + .msg.out > div { padding-top: 4px; }
.bubble ol { margin: 0; padding-inline-start: 20px; }
.bubble li + li { margin-top: 2px; }

/* The night mode switch: a moon by day, a sun by night */
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-inline-start: 4px; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; transition: color var(--fast) ease, background-color var(--fast) ease; }
.theme-btn:hover { color: var(--text); background: var(--tint); }
.theme-btn svg { width: 19px; height: 19px; transition: transform var(--mid) var(--ease); }
.theme-btn:hover svg { transform: rotate(-20deg); }
.theme-btn .sun { display: none; }
:root[data-theme="dark"] .theme-btn .sun { display: block; }
:root[data-theme="dark"] .theme-btn .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .sun { display: block; }
  :root:not([data-theme]) .theme-btn .moon { display: none; }
}
@media (max-width: 380px) { .theme-btn { margin-inline-start: 0; } .lang-btn { margin-inline-start: 2px; } }

/* The demo clock, under the store's try-it button */
.clock { display: flex; gap: 12px; align-items: flex-start; margin-top: 24px; padding: 14px 18px; max-width: 36em; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.clock svg { width: 20px; height: 20px; flex: none; margin-top: 4px; color: var(--accent); }
.clock p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.75; }
html[lang="en"] .clock p { line-height: 1.55; }
.clock b { color: var(--text); font-weight: 600; }

/* A button the chat presses by itself: not clickable, it dips and greys like a real press. */
span.chat-confirm { cursor: default; pointer-events: none; }
.chat-confirm.shown { background: var(--accent); border-color: var(--accent); color: var(--on-accent); animation: fade .45s ease both; }
.chat-confirm.pressing { transform: scale(.95); }
.chat-confirm.pressed { background: var(--tint); border-color: var(--border); color: var(--text-2); }
