/* Osama Abou Hajar — personal site. Built on the video identity tokens (tokens.css). */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-en); -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease; }
html[lang="ar"] body { font-family: var(--font-ar); }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* theme glue: tokens.css themes [data-theme]; we put it on <html> */
html[data-theme="dark"] { --page: var(--navy-950); --card: rgba(20, 27, 37, .72); --ring: rgba(255,255,255,.08); }
html[data-theme="light"] { --page: var(--sand-50); --card: rgba(255, 255, 255, .72); --ring: rgba(11,18,32,.08); }

.mono { font-family: var(--font-mono); }
.label { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.hl { color: var(--accent); font-style: normal; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; position: relative; }

/* ---------- hero dot field (canvas, hero only) ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 420px at 85% 10%, var(--accent-glow), transparent 70%); opacity: .7; }
html[data-theme="light"] .hero::before { opacity: .35; }
#field { position: absolute; top: 0; left: 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
.hero .wrap { z-index: 1; }
main, header.top, footer { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
header.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.brand img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); }
.brand .cur { display: inline-block; width: 8px; height: 15px; background: var(--accent); vertical-align: -2px; margin-inline-start: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
nav.links { display: flex; gap: 4px; margin-inline-start: auto; }
.viewsw { margin-inline-start: auto; }
nav.links + .viewsw { margin-inline-start: 0; }
html[data-view="agent"] .viewsw, header.top nav.links[hidden] + .viewsw { margin-inline-start: auto; }
nav.links a { text-decoration: none; font-size: 14px; color: var(--text-2); padding: 6px 12px; border-radius: 999px; }
nav.links a:hover { color: var(--text); background: var(--accent-soft); }
.tbtn { font: 500 13px var(--font-mono); color: var(--text-2); background: transparent; border: 1px solid var(--line-strong); border-radius: 999px;
  height: 32px; min-width: 32px; padding: 0 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tbtn:hover { color: var(--text); border-color: var(--accent); }
.tbtn kbd { font: inherit; font-size: 11px; opacity: .7; }

/* ---------- hero ---------- */
.hero { padding: 120px 0 110px; }
.hero .who { display: flex; align-items: center; gap: 28px; }
.avatar { position: relative; width: 132px; height: 132px; flex: none; }
.avatar img { position: absolute; inset: 10px; width: 112px; height: 112px; border-radius: 50%; object-fit: cover; }
.avatar svg { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.avatar circle { fill: none; stroke-width: 3; }
.avatar .trk { stroke: var(--line-strong); }
.avatar .rng { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 383; stroke-dashoffset: 383; animation: draw 1.2s .2s cubic-bezier(.65,0,.35,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero h1 { margin: 0; font-weight: 700; font-size: clamp(44px, 7vw, 84px); line-height: 1.05; letter-spacing: -0.02em; }
html[lang="ar"] .hero h1 { letter-spacing: 0; line-height: 1.25; }
.hero h1 .cursor { display: inline-block; width: .08em; height: .85em; background: var(--accent); vertical-align: -0.06em; margin-inline-start: .06em; animation: blink 1s steps(1) infinite; }
.hero .role { margin-top: 14px; font-size: clamp(17px, 2.2vw, 22px); color: var(--text-2); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero .role .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero .intro { margin: 44px 0 0; max-width: 720px; font-size: clamp(19px, 2.4vw, 26px); line-height: 1.6; color: var(--text); }
html[lang="ar"] .hero .intro { line-height: 1.85; }
.hero .intro .muted { color: var(--text-2); }
.socials { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 36px; }
.chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font: 500 13px var(--font-mono); letter-spacing: .06em;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); transition: border-color .2s, transform .2s; }
.chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.chip .ar { font-size: 12px; color: var(--accent); }
.hint { margin-top: 56px; font: 500 12px var(--font-mono); color: var(--text-3); letter-spacing: .08em; }
.hint kbd { font: inherit; border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 6px; color: var(--text-2); }

/* ---------- sections ---------- */
section.s { padding: 90px 0; border-top: 1px solid var(--line); }
.sh { display: flex; align-items: baseline; gap: 14px; margin-bottom: 40px; }
.sh h2 { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 700; letter-spacing: -0.01em; }
.sh .label { flex: none; }

/* ---------- journey: git log ---------- */
.log { position: relative; list-style: none; margin: 0; padding: 0; }
.log::before { content: ""; position: absolute; top: 10px; bottom: 10px; inset-inline-start: 11px; width: 2px; background: var(--line-strong); }
.commit { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 0 22px; padding: 0 0 46px; }
.commit:last-child { padding-bottom: 0; }
.commit .node { width: 24px; height: 24px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); margin-top: 4px; position: relative; z-index: 1; }
.commit.head .node { border-color: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.commit.head .node::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--accent); }
.commit .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 500 13px var(--font-mono); color: var(--text-3); }
.commit .meta .hash { color: var(--second); }
.commit .meta .ref { color: var(--accent-ink); background: var(--accent); padding: 1px 8px; border-radius: 6px; font-weight: 600; }
.commit .meta .ref.dim { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.commit h3 { margin: 8px 0 0; font-size: clamp(21px, 2.6vw, 28px); font-weight: 700; line-height: 1.3; }
.commit h3 .at { color: var(--text-2); font-weight: 500; }
.commit p { margin: 8px 0 0; max-width: 680px; font-size: 17px; line-height: 1.7; color: var(--text-2); }
html[lang="ar"] .commit p { line-height: 1.9; }
.commit .todo { display: inline-block; margin-top: 10px; font: 500 12px var(--font-mono); color: var(--red-500); border: 1px dashed currentColor; border-radius: 6px; padding: 2px 8px; }

/* ---------- talks ---------- */
.talk-feature { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: center; margin-bottom: 34px; }
.thumb { position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 16/9; background: var(--raised);
  box-shadow: 0 0 0 1px var(--ring), 0 24px 60px rgba(0,0,0,.25); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.thumb:hover img { transform: scale(1.04); }
.thumb .play { position: absolute; inset: auto auto 14px 14px; width: 46px; height: 46px; border-radius: 50%; background: var(--mint-400);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
html[dir="rtl"] .thumb .play { inset: auto 14px 14px auto; }
.thumb .play::before { content: ""; border-left: 14px solid var(--navy-950); border-top: 9px solid transparent; border-bottom: 9px solid transparent; margin-left: 4px; }
.talk-feature h3 { margin: 10px 0 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.3; font-family: var(--font-ar); }
.talk-feature p { margin: 12px 0 0; color: var(--text-2); font-size: 17px; line-height: 1.7; }
.talks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px 22px; }
.talk { text-decoration: none; display: block; }
.talk .t { margin-top: 12px; font-family: var(--font-ar); font-weight: 700; font-size: 17px; line-height: 1.5; direction: rtl; unicode-bidi: isolate; text-align: right; }
html[dir="ltr"] .talk .t, html[dir="ltr"] .talk-feature h3 { text-align: left; }
.talk-feature h3 { direction: rtl; unicode-bidi: isolate; }
.talk .m { margin-top: 6px; display: flex; gap: 10px; font: 500 12px var(--font-mono); color: var(--text-3); letter-spacing: .06em; }
.talk .m .k { color: var(--accent); }
.series { display: flex; align-items: center; gap: 10px; margin: 46px 0 18px; }
.series .bar { height: 1px; flex: 1; background: var(--line-strong); }
.photos { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }


/* ---------- contact ---------- */
.contact { padding: 110px 0 130px; border-top: 1px solid var(--line); }
.contact .big { font-size: clamp(34px, 6vw, 72px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; margin: 14px 0 0; }
html[lang="ar"] .contact .big { letter-spacing: 0; line-height: 1.35; }
.contact .term { margin-top: 40px; max-width: 640px; border-radius: 16px; background: var(--navy-900); color: #d6dde6; border: 1px solid rgba(255,255,255,.08);
  font: 15px/1.9 var(--font-mono); padding: 18px 22px; direction: ltr; text-align: left; overflow-x: auto; }
.contact .term .ps { color: var(--mint-400); }
.contact .term a { color: var(--mint-300); text-decoration: none; }
.contact .term a:hover { text-decoration: underline; }
footer { border-top: 1px solid var(--line); padding: 26px 0; font: 500 12px var(--font-mono); color: var(--text-3); letter-spacing: .06em; }
footer .wrap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- command palette (terminal) ---------- */
.palette { position: fixed; inset: 0; z-index: 50; display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px;
  background: rgba(5, 8, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.palette.open { display: flex; }
.palette .win { width: min(680px, 100%); border-radius: 18px; overflow: hidden; background: var(--navy-900); border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 40px 120px rgba(0,0,0,.6), 0 0 0 1px rgba(91,207,165,.25); direction: ltr; text-align: left; animation: drop .35s cubic-bezier(.16,1,.3,1); }
@keyframes drop { from { opacity: 0; transform: translateY(-24px) scale(1.02); } }
.palette .bar { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #0d131a; border-bottom: 1px solid rgba(255,255,255,.06); }
.palette .bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3441; }
.palette .bar i:first-child { background: var(--mint-400); }
.palette .bar span { margin-left: 10px; font: 500 12px var(--font-mono); color: #6b7685; }
.palette .out { max-height: 46vh; overflow-y: auto; padding: 16px 20px 4px; font: 14px/1.8 var(--font-mono); color: #c7d0db; white-space: pre-wrap; }
.palette .out .ps { color: var(--mint-400); }
.palette .out .ok { color: var(--mint-400); }
.palette .out .dim { color: #6b7685; }
.palette .out a { color: var(--mint-300); }
.palette .in { display: flex; align-items: center; gap: 10px; padding: 8px 20px 18px; font: 15px var(--font-mono); color: #f3f4f6; }
.palette .in .ps { color: var(--mint-400); }
.palette input { flex: 1; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; caret-color: var(--mint-400); }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1; transform: none; transition: none; }
  .avatar .rng { animation: none; stroke-dashoffset: 0; }
}

@media (max-width: 760px) {
  nav.links { display: none; }
  nav.links + .viewsw { margin-inline-start: auto; }
  header.top .wrap { gap: 10px; }
  .brand span.full { display: none; }
  .tbtn.k { display: none; }
  .hero { padding: 72px 0 80px; }
  .hero .who { flex-direction: column; align-items: flex-start; gap: 20px; }
  .avatar { width: 104px; height: 104px; } .avatar img { inset: 8px; width: 88px; height: 88px; }
  .talk-feature { grid-template-columns: 1fr; }
  section.s { padding: 70px 0; }
  .hint { display: none; }
}
html[lang="ar"] .hint { font-family: var(--font-ar); font-size: 14px; letter-spacing: 0; }

/* ---------- shared bits ---------- */
.sub { margin: -22px 0 36px; max-width: 680px; font-size: 18px; line-height: 1.7; color: var(--text-2); }
.ph { display: flex; align-items: center; justify-content: center; border: 1.5px dashed var(--line-strong); background:
  repeating-linear-gradient(45deg, transparent 0 14px, var(--accent-soft) 14px 15px); }
.ph > span { font: 500 11px var(--font-mono); letter-spacing: .12em; color: var(--text-3); text-align: center; padding: 8px; }
html[lang="ar"] .ph > span { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }
.more { display: inline-flex; align-items: center; gap: 10px; margin-top: 40px; text-decoration: none; font-weight: 600; font-size: 17px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }
.more:hover { background: var(--accent); color: var(--accent-ink); }
html[dir="rtl"] .arr { display: inline-block; transform: scaleX(-1); }
html[dir="rtl"] .visit .arr, html[dir="rtl"] .chip .ar { transform: scaleX(-1); display: inline-block; }

/* ---------- achievements ---------- */
.wins { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.win { display: flex; flex-direction: column; text-decoration: none; border-radius: 22px; overflow: hidden; background: var(--card);
  border: 1px solid var(--line); transition: transform .3s cubic-bezier(.2,.7,.2,1), border-color .3s; }
.win:hover { transform: translateY(-4px); border-color: var(--accent); }
.win-img { display: block; aspect-ratio: 4/3; overflow: hidden; border-radius: 0; border-width: 0 0 1.5px 0; }
.win-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.win-b { padding: 20px 22px 24px; }
.win .meta { display: flex; align-items: center; gap: 10px; font: 500 12px var(--font-mono); color: var(--text-3); }
.tagchip { color: var(--accent-ink); background: var(--accent); padding: 2px 8px; border-radius: 6px; font-weight: 600; letter-spacing: .08em; }
.win h3 { margin: 12px 0 0; font-size: 22px; line-height: 1.35; }
.win p { margin: 8px 0 0; font-size: 16px; line-height: 1.7; color: var(--text-2); }

/* ---------- projects ---------- */
.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }
.proj { display: flex; flex-direction: column; text-decoration: none; }
.proj.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
.pwin { display: block; border-radius: 16px; overflow: hidden; background: var(--navy-900); border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 0 0 1px var(--ring), 0 24px 60px rgba(0,0,0,.25); transition: transform .4s cubic-bezier(.2,.7,.2,1), box-shadow .4s; }
.proj:hover .pwin { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--mint-400), 0 30px 70px rgba(0,0,0,.3); }
.pbar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 12px; background: #0d131a; direction: ltr; }
.pbar i { width: 9px; height: 9px; border-radius: 50%; background: #2a3441; }
.pbar i:first-child { background: var(--mint-400); }
.purl { flex: 1; margin: 0 30px 0 14px; height: 20px; border-radius: 6px; background: #141b25; color: #8a95a5; font: 500 11px var(--font-mono);
  display: flex; align-items: center; justify-content: center; }
.pshot { display: block; aspect-ratio: 16/10; overflow: hidden; }
.pshot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pb { padding: 16px 2px 0; }
.proj.wide .pb { padding: 0; }
.ph-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.proj h3 { margin: 0; font-size: 24px; }
.proj.wide h3 { font-size: clamp(26px, 3vw, 36px); }
.cost { font: 600 12px var(--font-mono); color: var(--accent); border: 1px solid var(--accent); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
html[lang="ar"] .cost { font-family: var(--font-ar); font-size: 13px; }
.proj p { margin: 10px 0 0; font-size: 16px; line-height: 1.75; color: var(--text-2); }
.visit { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 15px; color: var(--accent); }

/* ---------- talks page ---------- */
.page-hero { padding: 90px 0 70px; }
.page-hero h1 { margin: 14px 0 0; font-size: clamp(40px, 6.5vw, 76px); line-height: 1.1; letter-spacing: -0.02em; }
html[lang="ar"] .page-hero h1 { line-height: 1.3; letter-spacing: 0; }
.page-hero .sub { margin: 18px 0 0; }
.back { display: inline-flex; gap: 8px; margin-bottom: 26px; text-decoration: none; font: 500 13px var(--font-mono); color: var(--text-2); }
.back:hover { color: var(--accent); }
.session { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; text-decoration: none; }
.ses-img { display: block; aspect-ratio: 16/10; border-radius: 20px; overflow: hidden; }
.ses-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.session h3 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.3; }
.session p { margin: 10px 0 0; color: var(--text-2); font-size: 17px; line-height: 1.75; }
.photos .pho { aspect-ratio: 4/3; border-radius: 16px; overflow: hidden; display: block; }
.photos .pho img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 760px) {
  .projects { grid-template-columns: 1fr; }
  .proj.wide { grid-template-columns: 1fr; gap: 0; }
  .proj.wide .pb { padding: 16px 2px 0; }
  .session { grid-template-columns: 1fr; gap: 18px; }
  .sub { margin-top: -16px; }
}
.win-img.ph, .ses-img.ph, .pho.ph { display: flex; }
.page-hero .label { display: block; }
.back { display: flex; width: fit-content; }

/* ---------- achievements v2 ---------- */
.win { cursor: default; }
.win.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; align-items: stretch; }
.win.featured .win-img { aspect-ratio: auto; min-height: 100%; border-width: 0; }
.win.featured .win-img img { object-position: top; }
.win.featured .win-b { padding: 34px 36px; align-self: center; }
.win.featured h3 { font-size: clamp(28px, 3.4vw, 40px); }
.win-img img { object-position: center 25%; }
.stats { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.stats b { display: block; font-family: var(--font-en); font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.1; direction: ltr; text-align: start; }
.stats span { font-size: 13px; color: var(--text-3); }
.wlinks { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.wlinks a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--accent); }
.wlinks a:hover { text-decoration: underline; }
.cost.tv { color: var(--second); border-color: var(--second); }

/* ---------- sessions v2 ---------- */
.ses-img { aspect-ratio: 4/3; }
.cities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.city { margin: 0; }
.city .pho { aspect-ratio: 4/3; border-radius: 14px; overflow: hidden; display: block; }
.city .pho img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.city:hover .pho img { transform: scale(1.05); }
.city figcaption { margin-top: 8px; font: 600 12px var(--font-mono); letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
html[lang="ar"] .city figcaption { font-family: var(--font-ar); font-size: 15px; letter-spacing: 0; }

/* ---------- press ---------- */
.wall { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.wall span { font: 600 13px var(--font-en); padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-strong); color: var(--text-2); background: var(--card); }
.plist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plist li a { display: grid; grid-template-columns: 200px 1fr auto auto; gap: 18px; align-items: baseline; padding: 16px 4px; text-decoration: none;
  border-bottom: 1px solid var(--line); transition: background .2s, padding .2s; }
.plist li a:hover { background: var(--accent-soft); padding-inline: 12px; }
.plist .src { font: 600 13px var(--font-mono); color: var(--accent); letter-spacing: .04em; }
.plist .pt { font-size: 17px; line-height: 1.5; }
.plist .lg { font: 500 11px var(--font-mono); color: var(--text-3); border: 1px solid var(--line-strong); padding: 1px 6px; border-radius: 5px; }
.plist .arr { color: var(--text-3); }

@media (max-width: 760px) {
  .win.featured { grid-template-columns: 1fr; }
  .win.featured .win-img { aspect-ratio: 16/10; }
  .win.featured .win-b { padding: 22px; }
  .cities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plist li a { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .plist .src { grid-column: 1 / -1; }
  .plist .lg { display: none; }
}
html[dir="ltr"] .plist .pt { text-align: left; }
html[dir="rtl"] .plist .pt { text-align: right; }
html[lang="ar"] footer { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }
.ses-img img { object-position: center 15%; }

/* ---------- journey: simple timeline ---------- */
.log { list-style: none; margin: 0; padding: 0; position: relative; }
.log::before { inset-inline-start: 162px; top: 16px; bottom: 16px; }
.step { position: relative; display: grid; grid-template-columns: 130px 22px 1fr; gap: 0 22px; padding-bottom: 44px; }
.step:last-child { padding-bottom: 0; }
.step .when { font: 500 14px var(--font-mono); color: var(--text-3); padding-top: 8px; text-align: end; direction: ltr; }
html[dir="rtl"] .step .when { text-align: left; }
.step.now .when { color: var(--accent); }
.step .dot { width: 14px; height: 14px; margin: 10px auto 0; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); position: relative; z-index: 1; }
.step.now .dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.step h3 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; }
.step .role { margin-top: 4px; font-size: 17px; color: var(--text-2); }
.hl-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hl-list li { display: flex; align-items: baseline; gap: 12px; font-size: 16px; padding: 10px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.hl-list .y { font: 600 12px var(--font-mono); color: var(--accent); flex: none; }
@media (max-width: 760px) {
  .log::before { inset-inline-start: 7px; }
  .step { grid-template-columns: 16px 1fr; gap: 4px 16px; }
  .step .when { grid-column: 2; grid-row: 1; text-align: start; padding-top: 0; }
  html[dir="rtl"] .step .when { text-align: right; }
  .step .dot { grid-column: 1; grid-row: 1 / span 2; margin: 4px 0 0; }
  .step .what { grid-column: 2; }
}
html[lang="ar"] .step .when { font-family: var(--font-ar); font-size: 15px; direction: rtl; }

/* ---------- Ask the agent (hero) ---------- */
.ask { margin-top: 44px; max-width: 820px; }
.ask-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ask-top .label { display: inline-flex; align-items: center; gap: 10px; }
html[lang="ar"] .ask-top .label { font-family: var(--font-ar); font-size: 14px; letter-spacing: 0; text-transform: none; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.ask-box { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 20px; border-radius: 18px; background: var(--card);
  border: 1.5px solid var(--line-strong); box-shadow: 0 20px 50px rgba(0,0,0,.12); transition: border-color .2s, box-shadow .2s; }
html[dir="rtl"] .ask-box { padding: 8px 20px 8px 8px; }
.ask-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 20px 50px rgba(0,0,0,.12); }
.ask-box .ps { font: 600 18px var(--font-mono); color: var(--accent); }
html[dir="rtl"] .ask-box .ps { transform: scaleX(-1); }
.ask-box input { flex: 1; min-width: 0; height: 48px; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 18px var(--font-en); }
html[lang="ar"] .ask-box input { font-family: var(--font-ar); }
.ask-box input::placeholder { color: var(--text-3); }
.ask-box .send { height: 46px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: 600 15px var(--font-en); cursor: pointer; white-space: nowrap; }
html[lang="ar"] .ask-box .send { font-family: var(--font-ar); }
.ask-box.busy .send { opacity: .5; cursor: progress; }
.ask-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qchip { font: 500 14px var(--font-en); color: var(--text-2); background: transparent; border: 1px dashed var(--line-strong); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: all .2s; }
html[lang="ar"] .qchip { font-family: var(--font-ar); }
.qchip:hover { color: var(--accent); border-color: var(--accent); border-style: solid; }
.ask-note { margin: 12px 0 0; font-size: 12px; color: var(--text-3); }
.ask-thread { margin-top: 22px; display: flex; flex-direction: column; gap: 18px; }
.msg .who { display: inline-flex; align-items: center; gap: 8px; font: 600 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
html[lang="ar"] .msg .who { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }
.msg .who img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1.5px var(--accent); }
.msg p { margin: 6px 0 0; font-size: 18px; line-height: 1.75; }
.msg.me p { color: var(--text-2); }
.msg.bot { padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent); }
.msg.err p { color: var(--red-500); }
.msg .dots { display: inline-flex; gap: 4px; margin-inline-start: 10px; vertical-align: middle; }
.msg .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite; }
.msg .dots i:nth-child(2) { animation-delay: .15s; } .msg .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }
.msg .caret { display: inline-block; width: 8px; height: 1.05em; background: var(--accent); vertical-align: -0.15em; margin-inline-start: 2px; }
.acards { margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.acards .projects { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.acards .proj h3 { font-size: 19px; } .acards .proj p { font-size: 14px; }
.acards .wins { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.acards .win.featured { grid-template-columns: 1fr; }
.acards .win.featured .win-img { aspect-ratio: 16/10; }
.acards .win h3 { font-size: 18px; } .acards .win p { font-size: 14px; }
.acards .talks { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.acards .log .step { padding-bottom: 22px; }
.acards .socials { margin-top: 0; }
@media (max-width: 760px) {
  .ask-box .send span:first-child { display: none; }
  .msg.bot { padding: 14px; }
}

/* ---------- view switch ---------- */
.viewsw { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--card); }
.vbtn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; text-decoration: none;
  font: 600 13px var(--font-en); color: var(--text-2); transition: background .2s, color .2s; white-space: nowrap; }
html[lang="ar"] .vbtn { font-family: var(--font-ar); }
.vbtn:hover { color: var(--text); }
html[data-view="agent"] .vbtn[data-v="agent"], html[data-view="classic"] .vbtn[data-v="classic"] { background: var(--accent); color: var(--accent-ink); }
.vbtn .spark { font-size: 12px; }

/* classic view: no agent box */
html[data-view="classic"] .ask { display: none; }
.ask .hello { display: none; }

/* agent view: the page is the conversation */
html[data-view="agent"] .page-home > section:not(.hero),
html[data-view="agent"] nav.links,
html[data-view="agent"] .hero .intro,
html[data-view="agent"] .hero .hint { display: none; }
html[data-view="agent"] .hero { min-height: calc(100vh - 64px); padding: 64px 0 56px; display: flex; flex-direction: column; justify-content: center; }
html[data-view="agent"] .hero .wrap { max-width: 860px; width: 100%; }
html[data-view="agent"] .hero .who { justify-content: center; text-align: center; flex-direction: column; gap: 16px; }
html[data-view="agent"] .hero .role { justify-content: center; }
html[data-view="agent"] .hero h1 { font-size: clamp(34px, 5vw, 52px); }
html[data-view="agent"] .avatar { width: 96px; height: 96px; }
html[data-view="agent"] .avatar img { inset: 7px; width: 82px; height: 82px; }
html[data-view="agent"] .ask { margin: 36px auto 0; max-width: 820px; }
html[data-view="agent"] .ask .hello { display: block; margin-bottom: 16px; }
html[data-view="agent"] .ask-top { display: none; }
html[data-view="agent"] .ask-sugg { justify-content: center; }
html[data-view="agent"] .ask-note { text-align: center; }
html[data-view="agent"] .ask-thread { margin: 0 0 18px; }
html[data-view="agent"] .ask-thread:not([hidden]) ~ .ask-sugg { justify-content: flex-start; }
html[data-view="agent"] .socials { justify-content: center; margin-top: 28px; }
html[data-view="agent"] .hero.chatting { justify-content: flex-start; }
@media (max-width: 760px) {
  .viewsw .vbtn { padding: 0 9px; }
  html[data-view="agent"] .hero { padding-top: 40px; }
}
.ask { display: flex; flex-direction: column; }
.ask-top { order: 0; } .ask .hello { order: 1; } .ask-thread { order: 2; } .ask-box { order: 3; } .ask-sugg { order: 4; } .ask-note { order: 5; }
html[data-view="agent"] .ask-thread:not([hidden]) { margin-top: 0; }
html[data-view="agent"] .hero.chatting .ask-top { display: flex; order: 6; justify-content: center; margin: 14px 0 0; }
html[data-view="agent"] .ask-top .label { display: none; }
.acards .win.featured .win-img { aspect-ratio: auto; height: 240px; }

/* ---------- chat mode (after the first question, agent view): ChatGPT-style ---------- */
.composer { order: 5; }
.composer-foot { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.composer-foot .ask-note { margin: 0; flex: 1; }
html[data-view="agent"] .composer-foot { justify-content: center; }
html[data-view="agent"] .ask-note { flex: 0 1 auto; }
#askReset .plus { font-size: 15px; }

html.chat[data-view="agent"] .hero .who,
html.chat[data-view="agent"] .hero .socials,
html.chat[data-view="agent"] .ask .hello,
html.chat[data-view="agent"] footer { display: none; }
html.chat[data-view="agent"] .hero { min-height: calc(100vh - 64px); padding: 28px 0 210px; justify-content: flex-start; }
html.chat[data-view="agent"] .hero::before, html.chat[data-view="agent"] #field { opacity: 0; }
html.chat[data-view="agent"] .ask { margin-top: 0; }
html.chat[data-view="agent"] .ask-thread { gap: 30px; }
html.chat[data-view="agent"] .composer { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 26px 16px 16px;
  background: linear-gradient(180deg, transparent, var(--bg) 34%); }
html.chat[data-view="agent"] .composer > * { max-width: 820px; margin-left: auto; margin-right: auto; }
html.chat[data-view="agent"] .ask-sugg { display: none; }

/* messages */
html.chat .msg.me { align-self: flex-end; max-width: 78%; }
html.chat .msg.me .who { display: none; }
html.chat .msg.me p { margin: 0; padding: 12px 18px; border-radius: 20px; background: var(--raised); border: 1px solid var(--line); color: var(--text); font-size: 17px; }
html.chat .msg.bot { background: transparent; border: 0; padding: 0; }
html.chat .msg.bot > p { font-size: 18px; }
.followups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.msg-anim { animation: msgIn .45s cubic-bezier(.16,1,.3,1); }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px); } }
@media (max-width: 760px) {
  html.chat .msg.me { max-width: 90%; }
  html.chat[data-view="agent"] .composer { padding: 18px 12px 10px; }
  html.chat[data-view="agent"] .ask-note { display: none; }
}
html.chat .ask-top { display: none !important; }
html[lang="ar"] #askReset { font-family: var(--font-ar); font-size: 13px; }

/* ================= adaptive page (agent view) ================= */
.visit, .trace, .tailored { display: none; }
html[data-view="agent"][data-stage="visit"] .visit { display: block; }
html[data-view="agent"]:not([data-stage="ask"]):not([data-stage="built"]) .ask { display: none; }
html[data-view="agent"][data-stage="build"] .trace, html[data-view="agent"][data-stage="built"] .trace { display: block; }
html[data-view="agent"][data-stage="built"] .tailored:not([hidden]) { display: block; }
html[data-view="agent"][data-stage="build"] .hero .socials, html[data-view="agent"][data-stage="built"] .hero .socials { display: none; }
html[data-view="agent"][data-stage="built"] .ask .hello { display: none; }
html[data-view="agent"][data-stage="built"] .ask { margin-top: 64px; }
html[data-view="agent"][data-stage="built"] .ask-top { display: flex; justify-content: center; }
html[data-view="agent"][data-stage="built"] .ask-top .label { display: inline-flex; }
html[data-view="agent"][data-stage="build"] .hero, html[data-view="agent"][data-stage="built"] .hero { justify-content: flex-start; }

/* visit */
.visit { margin: 40px auto 0; max-width: 820px; text-align: center; }
.visit-q { margin: 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.25; letter-spacing: -0.01em; }
.visit-sub { margin: 10px auto 0; max-width: 620px; font-size: 18px; line-height: 1.7; color: var(--text-2); }
.personas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.pchip { font: 600 15px var(--font-en); color: var(--text); background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 10px 18px; cursor: pointer; transition: transform .2s, border-color .2s, background .2s; }
html[lang="ar"] .pchip { font-family: var(--font-ar); }
.pchip:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--accent-soft); }
.visit-box { display: flex; align-items: flex-end; gap: 10px; margin-top: 18px; padding: 10px; border-radius: 20px; background: var(--card);
  border: 1.5px solid var(--line-strong); box-shadow: 0 24px 60px rgba(0,0,0,.14); text-align: start; transition: border-color .2s, box-shadow .2s; }
.visit-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft), 0 24px 60px rgba(0,0,0,.14); }
.visit-box textarea { flex: 1; min-width: 0; min-height: 48px; max-height: 240px; resize: none; border: 0; outline: 0; background: transparent; color: var(--text);
  font: 400 17px/1.6 var(--font-en); padding: 11px 10px; }
html[lang="ar"] .visit-box textarea { font-family: var(--font-ar); }
.visit-box textarea::placeholder { color: var(--text-3); }
.visit-box .send { height: 48px; padding: 0 20px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-ink); font: 700 15px var(--font-en); cursor: pointer; white-space: nowrap; }
html[lang="ar"] .visit-box .send { font-family: var(--font-ar); }
.linkbtn { margin-top: 14px; background: none; border: 0; color: var(--text-3); font: 500 14px var(--font-en); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
html[lang="ar"] .linkbtn { font-family: var(--font-ar); }
.linkbtn:hover { color: var(--accent); }

/* trace (agent team at work) */
.trace { margin: 34px auto 0; max-width: 820px; border-radius: 20px; background: var(--navy-900); border: 1px solid rgba(255,255,255,.08); color: #d6dde6;
  box-shadow: 0 30px 80px rgba(0,0,0,.35), 0 0 0 1px rgba(91,207,165,.18); overflow: hidden; }
.tr-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: #0d131a; border-bottom: 1px solid rgba(255,255,255,.06); direction: ltr; }
.tr-head .label { color: var(--mint-400); font-size: 11px; }
.tr-time { font-size: 13px; color: #8a95a5; }
.agents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(255,255,255,.06); }
.agent { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--navy-900); position: relative; }
.agent .ic { width: 34px; height: 34px; flex: none; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; background: rgba(255,255,255,.06); color: #8a95a5; }
.agent b { display: block; font-size: 15px; color: #f3f4f6; }
.agent div span { display: block; font-size: 12px; color: #8a95a5; line-height: 1.4; margin-top: 2px; }
.agent .st { margin-inline-start: auto; font: 600 10px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: #6b7685; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); flex: none; }
html[lang="ar"] .agent .st { font-family: var(--font-ar); font-size: 11px; letter-spacing: 0; }
.agent[data-st="run"] .ic { background: rgba(91,207,165,.15); color: var(--mint-400); animation: pulse 1.2s ease-in-out infinite; }
.agent[data-st="run"] .st { color: var(--mint-400); border-color: var(--mint-400); }
.agent[data-st="run"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--mint-400), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: sweep 1.2s linear infinite; }
.agent[data-st="done"] .ic { background: var(--mint-400); color: var(--navy-950); }
.agent[data-st="done"] .st { color: var(--navy-950); background: var(--mint-400); border-color: transparent; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(91,207,165,.12); } }
@keyframes sweep { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.tr-log { max-height: 230px; overflow-y: auto; padding: 14px 18px 16px; font-size: 13px; line-height: 1.8; }
.tr-log .ln { display: flex; gap: 12px; animation: msgIn .35s cubic-bezier(.16,1,.3,1); }
.tr-log .who { flex: none; width: 64px; color: var(--mint-400); direction: ltr; text-align: left; }
.tr-log .txt { color: #c7d0db; }
html[lang="ar"] .tr-log .txt { font-family: var(--font-ar); font-size: 14px; }
.tr-log .ln.ok .who, .tr-log .ln.ok .txt { color: var(--mint-400); }
.tr-log .ln.err .who, .tr-log .ln.err .txt { color: var(--red-500); }
.trace .retry { margin: 0 18px 16px; }
html[data-stage="built"] .tr-log { max-height: 120px; }

/* tailored page */
.tailored { margin: 44px auto 0; max-width: 980px; }
.tl-head { text-align: center; }
.tl-head h2 { margin: 12px 0 0; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.2; letter-spacing: -0.01em; }
.tl-head p { margin: 14px auto 0; max-width: 720px; font-size: 19px; line-height: 1.75; color: var(--text-2); }
.tl-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.btn-main, .btn-ghost { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 14px; font: 700 15px var(--font-en); cursor: pointer; text-decoration: none; }
html[lang="ar"] .btn-main, html[lang="ar"] .btn-ghost { font-family: var(--font-ar); }
.btn-main { background: var(--accent); color: var(--accent-ink); border: 0; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.fit { display: grid; grid-template-columns: 150px 1fr; gap: 28px; margin-top: 44px; padding: 28px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.fit-score { position: relative; width: 150px; height: 150px; }
.fit-score .ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.fit-score circle { fill: none; stroke-width: 8; }
.fit-score .trk { stroke: var(--line-strong); }
.fit-score .val { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.65,0,.35,1); }
.fit-score b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 40px var(--font-en); color: var(--accent); }
.fit-score b::after { content: "%"; font-size: 18px; margin-top: 10px; }
.fit h3 { margin: 0; font-size: 24px; }
.fit-b > p { margin: 8px 0 0; color: var(--text-2); line-height: 1.7; }
.fit-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-top: 18px; }
.fit-cols ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fit-cols li { font-size: 15px; line-height: 1.6; }
.fit .label.gap { color: var(--second); }
.gaps li { color: var(--text-2); padding-inline-start: 14px; border-inline-start: 2px solid var(--second); }
.why { margin-top: 44px; }
.why h3 { margin: 0 0 16px; font-size: 24px; text-align: center; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.why-c { padding: 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.why-c .n { color: var(--accent); font-size: 12px; font-weight: 600; }
.why-c p { margin: 8px 0 0; font-size: 16px; line-height: 1.65; }
.evs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ev { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); text-decoration: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
a.ev:hover { background: var(--accent); color: var(--accent-ink); }
.tailored .series { margin-top: 44px; }
.tailored .projects { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tailored .win.featured { grid-template-columns: 1fr; }
.tailored .win.featured .win-img { aspect-ratio: auto; height: 260px; }
@media (max-width: 760px) {
  .agents { grid-template-columns: 1fr; }
  .fit { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .fit-cols { grid-template-columns: 1fr; text-align: start; }
  .visit-box { flex-direction: column; align-items: stretch; }
}
html[lang="ar"] .tl-head .label, html[lang="ar"] .tailored .series .label { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; text-transform: none; }
.tl-head .label { direction: ltr; unicode-bidi: plaintext; }
.btn-ghost, .btn-main { max-width: 100%; }
/* personal tailored blocks */
.common { margin: 40px auto 0; max-width: 760px; text-align: center; padding: 22px 26px; border-radius: 20px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.common p { margin: 8px 0 0; font-size: 18px; line-height: 1.75; }
html[lang="ar"] .common .label { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }
.start { margin-top: 44px; }
.start h3 { margin: 0 0 16px; font-size: 24px; text-align: center; }
.start-list { list-style: none; margin: 0 auto; padding: 0; max-width: 760px; display: flex; flex-direction: column; gap: 10px; }
.start-list a, .start-list .nolink { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-decoration: none; transition: border-color .2s, transform .2s; }
.start-list a:hover { border-color: var(--accent); transform: translateX(4px); }
html[dir="rtl"] .start-list a:hover { transform: translateX(-4px); }
.start-list .n { width: 30px; height: 30px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.start-list div { flex: 1; min-width: 0; }
.start-list b { display: block; font-size: 16px; }
.start-list div span { display: block; font-size: 14px; color: var(--text-2); margin-top: 2px; line-height: 1.6; }
.start-list .arr { color: var(--accent); flex: none; }

/* ---------- blueprint: the page being built, live ---------- */
.bp { position: relative; margin: 0; padding: 18px; background:
  radial-gradient(circle at center, rgba(91,207,165,.16) 1px, transparent 1.6px) 0 0 / 22px 22px, #0c1219;
  border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); overflow: hidden;
  max-height: 520px; transition: max-height .8s cubic-bezier(.65,0,.35,1), padding .8s, opacity .5s; direction: ltr; }
.bp.gone { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; }
.bp-page { position: relative; max-width: 640px; margin: 0 auto; padding: 16px 18px 20px; border: 1.5px dashed rgba(91,207,165,.35); border-radius: 14px; background: rgba(11,15,20,.6); }
.bp-top { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #6b7685; margin-bottom: 12px; }
.bp-top b { color: var(--mint-400); font-weight: 500; }
.bp-status { margin-left: auto; color: var(--mint-400); }
.bp-tray { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; margin-bottom: 14px; }
.bp-chip { font-size: 11px; color: var(--mint-300); padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(91,207,165,.4); background: rgba(91,207,165,.08);
  animation: chipIn .5s cubic-bezier(.34,1.56,.64,1) both; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes chipIn { from { opacity: 0; transform: translateY(-18px) scale(.6); } }
.bp-head, .bp-cards, .bp-rows { opacity: .25; transition: opacity .4s; }
.bp[data-phase="write"] .bp-head, .bp[data-phase="write"] .bp-cards, .bp[data-phase="write"] .bp-rows,
.bp[data-phase="filled"] .bp-head, .bp[data-phase="filled"] .bp-cards, .bp[data-phase="filled"] .bp-rows,
.bp[data-phase="guard"] .bp-head, .bp[data-phase="guard"] .bp-cards, .bp[data-phase="guard"] .bp-rows,
.bp[data-phase="done"] .bp-head, .bp[data-phase="done"] .bp-cards, .bp[data-phase="done"] .bp-rows { opacity: 1; }
.bp-h { position: relative; height: 26px; border-radius: 6px; margin-bottom: 10px; display: flex; align-items: center; padding: 0 10px; font-weight: 700; font-size: 15px; color: #f3f4f6; }
.bp-l { height: 9px; border-radius: 5px; margin-top: 8px; }
.bp-l.w90 { width: 90%; } .bp-l.w70 { width: 70%; }
.bp-h, .bp-l, .bp-card, .bp-row { background: linear-gradient(90deg, rgba(255,255,255,.04) 0%, rgba(91,207,165,.14) 50%, rgba(255,255,255,.04) 100%) 0 0 / 200% 100%;
  outline: 1.5px dashed rgba(91,207,165,.3); outline-offset: -1.5px; }
.bp[data-phase="write"] .bp-h, .bp[data-phase="write"] .bp-l, .bp[data-phase="write"] .bp-card, .bp[data-phase="write"] .bp-row { animation: shimmer 1.4s linear infinite, build .7s cubic-bezier(.16,1,.3,1) both; animation-delay: 0s, calc(var(--d, 0) * .15s); }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes build { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.bp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.bp-card { position: relative; height: 84px; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; justify-content: flex-end; gap: 5px; }
.bp-card i { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); }
.bp-card i:last-child { width: 60%; }
.bp-cap { font-size: 11px; font-weight: 600; color: #f3f4f6; direction: rtl; text-align: start; unicode-bidi: plaintext; line-height: 1.35; max-height: 30px; overflow: hidden; }
.bp-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.bp-row { position: relative; min-height: 26px; border-radius: 8px; padding: 5px 10px 5px 26px; display: flex; align-items: center; }
.bp-row b { font-size: 11px; font-weight: 500; color: #c7d0db; unicode-bidi: plaintext; line-height: 1.4; }
.bp-row i { position: absolute; left: 9px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: rgba(91,207,165,.5); }
.filled { background: rgba(91,207,165,.07) !important; outline-style: solid !important; outline-color: rgba(91,207,165,.45) !important; animation: none !important; }
.bp-h .t { unicode-bidi: plaintext; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bp-ok { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; background: var(--mint-400); color: var(--navy-950); transform: scale(0); transition: transform .35s cubic-bezier(.34,1.56,.64,1); z-index: 2; }
.ok > .bp-ok { transform: scale(1); }
.bad { outline-color: var(--red-500) !important; background: rgba(239,83,80,.08) !important; }
.bad > .bp-ok { transform: scale(1); background: var(--red-500); color: #fff; }
.bad > .bp-ok::before { content: "✗"; } .bad > .bp-ok { font-size: 0; } .bad > .bp-ok::before { font-size: 11px; }
.bp-scan { position: absolute; left: 0; right: 0; top: -40px; height: 40px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(91,207,165,.35), transparent); border-bottom: 2px solid var(--mint-400); }
.bp[data-phase="guard"] .bp-scan { opacity: 1; animation: scanY 1.6s ease-in-out infinite; }
@keyframes scanY { from { top: -40px; } to { top: 100%; } }
.bp-crane { position: absolute; top: 18px; left: 0; width: 2px; height: calc(100% - 36px); background: rgba(91,207,165,.5); opacity: 0; pointer-events: none; }
.bp-crane span { position: absolute; top: 0; left: -5px; width: 12px; height: 18px; background: var(--mint-400); border-radius: 2px; animation: blink 1s steps(1) infinite; }
.bp[data-phase="write"] .bp-crane { opacity: 1; animation: crane 2.6s ease-in-out infinite alternate; }
@keyframes crane { from { left: 12%; } to { left: 88%; } }
.bp[data-phase="done"] .bp-page { border-style: solid; border-color: var(--mint-400); box-shadow: 0 0 0 6px rgba(91,207,165,.08); transition: all .4s; }
.bp[data-phase="error"] .bp-page { border-color: var(--red-500); }
html[data-stage="built"] .trace .tr-log { max-height: 0; padding: 0 18px; overflow: hidden; }
html[data-stage="built"] .trace { cursor: default; }
.tr-log { max-height: 150px; }
@media (max-width: 760px) { .bp-cards { grid-template-columns: repeat(2, 1fr); } .bp-cards .bp-card:nth-child(3) { display: none; } }
@media (prefers-reduced-motion: reduce) { .bp *, .bp { animation: none !important; transition: none !important; } }

/* ================= intent-driven page v2 ================= */
/* after a build, the request box stays on top as a compact "ask again" bar */
html[data-view="agent"][data-stage="built"] .visit { display: block; margin-top: 18px; }
html[data-stage="built"] .visit .visit-q, html[data-stage="built"] .visit .visit-sub, html[data-stage="built"] .visit .personas, html[data-stage="built"] .visit .linkbtn { display: none; }
html[data-stage="built"] .visit-box { margin-top: 0; box-shadow: none; }
html[data-view="agent"][data-stage="built"] .hero .who { display: none; }

/* blueprint: dynamic blocks chosen by the planner */
.bp-blocks { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; min-height: 120px; }
.bp-wait { display: flex; gap: 8px; justify-content: center; align-items: center; height: 120px; }
.bp-wait i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint-400); animation: dot 1s infinite; }
.bp-wait i:nth-child(2) { animation-delay: .15s; } .bp-wait i:nth-child(3) { animation-delay: .3s; }
.bp-block { position: relative; border-radius: 10px; padding: 10px 12px; outline: 1.5px dashed rgba(91,207,165,.35); outline-offset: -1.5px; background: rgba(255,255,255,.02);
  animation: blockIn .55s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i) * .18s); }
@keyframes blockIn { from { opacity: 0; transform: translateY(14px) scale(.97); clip-path: inset(0 100% 0 0); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
.bp-bt { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #c7d0db; }
.bp-bt .ic { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: rgba(91,207,165,.15); color: var(--mint-400); font-size: 12px; flex: none; }
.bp-bt b { color: var(--mint-400); font: 600 11px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; flex: none; }
html[lang="ar"] .bp-bt b { font-family: var(--font-ar); font-size: 12px; letter-spacing: 0; text-transform: none; }
.bp-bt .f { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: start; }
.bp-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); gap: 6px; margin-top: 8px; }
.bp-cells .cell { height: 22px; border-radius: 5px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(91,207,165,.14), rgba(255,255,255,.04)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; animation-delay: calc(var(--d) * .12s); }
.k-work .bp-cells, .k-story .bp-cells, .k-advice .bp-cells, .k-posts .bp-cells { grid-template-columns: 1fr; }
.k-answer .bp-cells .cell { height: 34px; }
.k-stats .bp-cells .cell { height: 30px; }
.bp-block.filled { background: rgba(91,207,165,.07); outline-style: solid; outline-color: rgba(91,207,165,.45); }
.bp-block.filled .cell { animation: none; background: rgba(91,207,165,.18); }
.bp[data-phase="write"] .bp-block { box-shadow: 0 0 0 1px rgba(91,207,165,.08); }

/* rendered blocks */
.blk { margin-top: 48px; opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
.blk.shown { opacity: 1; transform: none; }
.blk-h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.blk-h > .ic { width: 42px; height: 42px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 18px; }
.blk-h .label { display: block; }
html[lang="ar"] .blk-h .label { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; text-transform: none; }
.blk-h h3 { margin: 4px 0 0; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.3; }
.blk-h p { margin: 6px 0 0; color: var(--text-2); font-size: 16px; line-height: 1.7; }
.blk-cta { margin-top: 18px; }
.blk .ev { font-size: 12px; }
/* items appear in sequence once the block is live */
.blk [style*="--n"] { opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .5s cubic-bezier(.16,1,.3,1); transition-delay: calc(var(--n) * .09s + .15s); }
.blk.shown [style*="--n"] { opacity: 1; transform: none; }

.b-answer { padding: 26px 28px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); border-inline-start: 4px solid var(--accent); }
.b-answer p { margin: 0 0 12px; font-size: 20px; line-height: 1.8; }

.b-work { list-style: none; margin: 0; padding: 0; position: relative; }
.b-work::before { content: ""; position: absolute; inset-inline-start: 107px; top: 10px; bottom: 10px; width: 2px; background: var(--accent); transform-origin: top; transform: scaleY(0); transition: transform 1.2s cubic-bezier(.65,0,.35,1) .2s; }
.blk.shown .b-work::before { transform: scaleY(1); }
.b-work li { display: grid; grid-template-columns: 90px 18px 1fr; gap: 0 16px; padding-bottom: 26px; }
.b-work .when { color: var(--accent); font-size: 13px; padding-top: 6px; text-align: end; }
.b-work .dot { width: 14px; height: 14px; margin-top: 7px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); position: relative; z-index: 1; }
.b-work h4 { margin: 0; font-size: 20px; } .b-work p { margin: 4px 0 8px; color: var(--text-2); line-height: 1.7; }

.b-story { display: flex; flex-direction: column; gap: 14px; }
.b-story .chap { display: grid; grid-template-columns: 90px 1fr; gap: 18px; align-items: start; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.b-story .yr { font-size: 22px; font-weight: 600; color: var(--accent); }
.b-story h4 { margin: 0; font-size: 19px; } .b-story p { margin: 6px 0 8px; color: var(--text-2); line-height: 1.75; }

.b-advice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; counter-reset: a; }
.adv { position: relative; padding: 24px 22px 20px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.adv .num { position: absolute; top: -10px; inset-inline-end: 10px; font: 700 84px var(--font-en); color: var(--accent); opacity: .12; line-height: 1; }
.adv h4 { position: relative; margin: 0; font-size: 19px; line-height: 1.4; }
.adv p { position: relative; margin: 8px 0 0; color: var(--text-2); line-height: 1.7; font-size: 15px; }
.adv .src { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 11px; color: var(--text-3); }
.adv blockquote, .pcard blockquote { margin: 12px 0 0; padding: 10px 14px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }

.b-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.bp-proj { text-decoration: none; display: block; }
.bp-proj:hover .pwin { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--mint-400), 0 30px 70px rgba(0,0,0,.3); }
.bp-proj h4 { margin: 12px 0 0; font-size: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bp-proj p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.7; }

.b-init { display: grid; grid-template-columns: 1fr 1.1fr; gap: 24px; align-items: center; padding: 22px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.b-init img { width: 100%; border-radius: 14px; display: block; }
.b-init .steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-init .steps li { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; background: var(--raised); }
.b-init .steps span { font-size: 14px; color: var(--text-2); line-height: 1.6; }

.b-talks .embed { position: relative; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000; box-shadow: 0 30px 70px rgba(0,0,0,.3); }
.b-talks .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.tl-item { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.tl-item:hover { border-color: var(--accent); }
.tl-item img { width: 96px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; flex: none; }
.tl-item b { display: block; font-size: 14px; line-height: 1.4; } .tl-item span { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }

.b-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.pcard { display: block; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-decoration: none; }
.pcard:hover { border-color: var(--accent); }
.pcard .src { font-size: 11px; color: var(--accent); } .pcard h4 { margin: 6px 0 0; font-size: 17px; } .pcard p { margin: 6px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.7; }

.b-press { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.b-press .pr { display: grid; grid-template-columns: 180px 1fr auto; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.b-press .pr b { color: var(--accent); font: 600 13px var(--font-mono); } .b-press .pr:hover { background: var(--accent-soft); }

.b-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.b-stats .st { padding: 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); text-align: center; }
.b-stats b { display: block; font: 700 clamp(34px, 5vw, 48px) var(--font-en); color: var(--accent); line-height: 1.1; direction: ltr; }
.b-stats span { display: block; margin-top: 8px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.b-stats em { display: block; margin-top: 6px; font-size: 11px; color: var(--text-3); font-style: normal; }

.b-connect { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cn { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); text-decoration: none; position: relative; }
.cn:hover { border-color: var(--accent); transform: translateY(-2px); }
.cn b { font-size: 17px; } .cn span { font-size: 14px; color: var(--text-2); line-height: 1.6; } .cn .arr { position: absolute; top: 16px; inset-inline-end: 16px; color: var(--accent); }

.nextbar { margin: 56px auto 0; text-align: center; }
html[lang="ar"] .nextbar .label { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }
.nexts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
@media (max-width: 760px) {
  .b-work::before { inset-inline-start: 7px; } .b-work li { grid-template-columns: 16px 1fr; } .b-work .when { grid-column: 2; text-align: start; padding: 0; } .b-work .dot { grid-row: 1 / span 2; margin-top: 3px; }
  .b-story .chap { grid-template-columns: 1fr; gap: 6px; } .b-init { grid-template-columns: 1fr; } .b-press .pr { grid-template-columns: 1fr auto; } .b-press .pr b { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .blk, .blk [style*="--n"], .bp-block { opacity: 1 !important; transform: none !important; animation: none !important; transition: none !important; } }
html[lang="ar"] .adv .src .mono, html[lang="ar"] .pcard .src { font-family: var(--font-ar); font-size: 12px; letter-spacing: 0; }

/* ===================== WORKSPACE (agent view) ===================== */
.ws { display: none; }
html[data-view="agent"] .page-home > section:not(.ws), html[data-view="agent"] footer { display: none !important; }
html[data-view="agent"] .page-home > section.ws { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 64px); height: calc(100dvh - 64px); overflow: hidden; }
html[data-view="agent"] body { overflow: hidden; }

/* rail */
.ws-rail { display: flex; flex-direction: column; min-height: 0; border-inline-end: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, var(--accent) 3%); }
.ws-me { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.ws-me img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.ws-me b { display: block; font-size: 16px; } .ws-me span { font-size: 12px; color: var(--text-3); }
.ws-feed { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.fu { align-self: flex-end; max-width: 90%; }
.fu p { margin: 0; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--accent); color: var(--accent-ink); font-size: 14px; line-height: 1.6; }
html[dir="rtl"] .fu p { border-radius: 16px 16px 16px 4px; }
.fr { all: unset; box-sizing: border-box; display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.fr.cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fr.err { border-color: var(--red-500); }
.fa { display: grid; grid-template-columns: 22px auto 1fr; gap: 8px; align-items: center; font-size: 12px; color: var(--text-3); }
.fa i { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-style: normal; background: var(--raised); }
.fa b { font-weight: 600; color: var(--text-2); }
.fa em { font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: start; }
.fa[data-st="run"] i { background: var(--accent-soft); color: var(--accent); animation: pulse 1.2s infinite; }
.fa[data-st="run"] em { color: var(--accent); }
.fa[data-st="done"] i { background: var(--accent); color: var(--accent-ink); }
.fsum { font-size: 11px; color: var(--text-3); min-height: 14px; }
.ws-input { display: flex; align-items: flex-end; gap: 8px; margin: 12px; padding: 8px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line-strong); }
.ws-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ws-input textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 15px/1.55 var(--font-en); padding: 8px; max-height: 160px; }
html[lang="ar"] .ws-input textarea { font-family: var(--font-ar); }
.ws-input .send { width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-size: 18px; cursor: pointer; }
.ws.busy .ws-input .send { opacity: .4; cursor: progress; }

/* canvas */
.ws-canvas { position: relative; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 28px clamp(16px, 3vw, 40px) 60px;
  background: radial-gradient(circle at center, var(--dot) 1px, transparent 1.6px) 0 0 / 26px 26px; scrollbar-width: thin; }
.ws-empty { max-width: 860px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; justify-content: center; text-align: center; padding: 20px 0; }
.ws-empty .label { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.ws-empty h1 { margin: 16px 0 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.2; letter-spacing: -0.01em; }
.ws-empty p { margin: 12px auto 0; max-width: 560px; color: var(--text-2); font-size: 18px; line-height: 1.7; }
.ws-intents { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 34px; text-align: start; }
.wi { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
  transition: transform .25s cubic-bezier(.16,1,.3,1), border-color .2s, box-shadow .25s; animation: wiIn .6s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--n) * .06s + .1s); }
@keyframes wiIn { from { opacity: 0; transform: translateY(14px); } }
.wi:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.wi .ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 8px; }
.wi b { font-size: 17px; } .wi span:last-child { font-size: 13px; color: var(--text-3); }

/* board */
.ws-board { max-width: 1100px; margin: 0 auto; position: relative; }
.bd-h { margin-bottom: 18px; min-height: 70px; }
.bd-h h2 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.25; animation: msgIn .5s cubic-bezier(.16,1,.3,1); }
.bd-h p { margin: 8px 0 0; max-width: 820px; color: var(--text-2); font-size: 17px; line-height: 1.7; animation: msgIn .6s cubic-bezier(.16,1,.3,1); }
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--raised), color-mix(in srgb, var(--accent) 18%, var(--raised)), var(--raised)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.sk-h { height: 34px; width: 60%; } .sk-l { height: 14px; width: 85%; margin-top: 12px; }
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; grid-auto-flow: row dense; align-items: start; }
.s2 { grid-column: span 2; } .s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s6 { grid-column: span 6; }
.tile { position: relative; padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); min-height: 160px;
  animation: tileIn .55s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * .12s); transition: border-color .3s, box-shadow .3s; }
@keyframes tileIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.tile.skel { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.th { display: flex; align-items: center; gap: 8px; }
.th .ic { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.th .label { font-size: 11px; }
html[lang="ar"] .th .label { font-family: var(--font-ar); font-size: 12px; letter-spacing: 0; text-transform: none; }
.tt { margin: 10px 0 0; font-size: 19px; line-height: 1.35; }
.tile.skel .tt { color: var(--text-3); font-weight: 500; font-size: 14px; }
.cells { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.cells i { display: block; height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--raised), color-mix(in srgb, var(--accent) 16%, var(--raised)), var(--raised)) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; animation-delay: calc(var(--d) * .15s); }
.cells i:nth-child(2) { width: 85%; } .cells i:nth-child(3) { width: 60%; }
.tb { margin-top: 10px; }
.tile.filling .tb > * { opacity: 0; transform: translateY(8px); transition: opacity .45s, transform .45s cubic-bezier(.16,1,.3,1); }
.tile.filling.in .tb > * { opacity: 1; transform: none; }
.tile.filling.in .tb [style*="--n"] { animation: msgIn .45s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--n) * .07s); }
.ti { margin: 0 0 10px; font-size: 14px; color: var(--text-2); line-height: 1.6; }
.vbadge { position: absolute; top: 12px; inset-inline-end: 12px; font: 600 11px var(--font-mono); padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); transform: scale(0); transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.tile.ok .vbadge, .tile.fixed .vbadge { transform: scale(1); }
.tile.fixed .vbadge { background: var(--second); }
.tile.ok { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.planning { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 160px; color: var(--accent); font-size: 14px; }
.planning i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: dot 1s infinite; }
.planning i:nth-child(2) { animation-delay: .15s; } .planning i:nth-child(3) { animation-delay: .3s; }
.ws-board.scanning::after { content: ""; position: absolute; left: -10px; right: -10px; height: 70px; top: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 22%, transparent), transparent); border-bottom: 2px solid var(--accent); animation: boardScan 1.4s ease-in-out infinite; }
@keyframes boardScan { from { top: 0; } to { top: calc(100% - 70px); } }

/* agent cursor */
.ws-cursor { position: absolute; top: 0; left: 0; z-index: 5; pointer-events: none; transition: transform .9s cubic-bezier(.65,0,.35,1); display: flex; align-items: flex-start; gap: 2px; }
.ws-cursor svg { width: 20px; height: 20px; fill: var(--mint-400); stroke: var(--navy-950); stroke-width: 1.2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.ws-cursor span { margin-top: 14px; font: 600 11px var(--font-en); padding: 3px 8px; border-radius: 6px; background: var(--mint-400); color: var(--navy-950); white-space: nowrap; }
html[lang="ar"] .ws-cursor span { font-family: var(--font-ar); }

/* tile contents */
.t-answer { margin: 0 0 10px; font-size: 18px; line-height: 1.8; }
.t-line { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.t-line li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding-inline-start: 0; }
.t-line .when { font-size: 12px; color: var(--accent); padding-top: 3px; }
.t-line b { display: block; font-size: 15px; } .t-line span { display: block; font-size: 13px; color: var(--text-2); line-height: 1.6; margin-top: 2px; }
.t-line.story li { padding: 10px 12px; border-radius: 12px; background: var(--raised); }
.t-adv { display: flex; flex-direction: column; gap: 10px; }
.adv-i { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px; border-radius: 14px; background: var(--raised); }
.adv-i .num { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); font: 700 16px var(--font-en); }
.adv-i b { display: block; font-size: 15px; line-height: 1.4; } .adv-i > div > span { display: block; font-size: 13px; color: var(--text-2); line-height: 1.6; margin-top: 3px; }
.adv-i .src { margin-top: 8px; } .adv-i blockquote { margin: 8px 0 0; padding: 8px 12px; border-inline-start: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; font-size: 12px; color: var(--text-2); }
.t-proj { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.pj { display: block; text-decoration: none; border-radius: 14px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.pj:hover { transform: translateY(-2px); border-color: var(--accent); }
.pj img { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top; display: block; }
.pj div { padding: 10px 12px 12px; } .pj b { display: block; font-size: 15px; } .pj .cost { display: inline-block; margin: 4px 0; }
.pj div > span:last-child { display: block; font-size: 12px; color: var(--text-2); line-height: 1.55; }
.t-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; margin-bottom: 12px; }
.t-stats div { padding: 12px; border-radius: 12px; background: var(--raised); text-align: center; }
.t-stats b { display: block; font: 700 26px var(--font-en); color: var(--accent); direction: ltr; } .t-stats span { font-size: 12px; color: var(--text-2); }
.t-stats.big b { font-size: 34px; }
.t-steps { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.t-steps b { display: block; font-size: 14px; } .t-steps span { color: var(--text-2); line-height: 1.6; }
.tile .embed { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; }
.tile .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.t-vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 10px; }
.vd { text-decoration: none; display: block; } .vd img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 10px; display: block; }
.vd b { display: block; margin-top: 6px; font-size: 12px; line-height: 1.4; }
.t-posts { display: flex; flex-direction: column; gap: 8px; }
.ps { display: block; padding: 10px 12px; border-radius: 12px; background: var(--raised); text-decoration: none; }
.ps .mono { font-size: 11px; color: var(--accent); } .ps b { display: block; font-size: 14px; margin-top: 2px; } .ps span:last-child { display: block; font-size: 12px; color: var(--text-2); line-height: 1.55; }
.t-press, .t-conn { display: flex; flex-direction: column; gap: 6px; }
.t-press a, .t-conn a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: var(--raised); text-decoration: none; position: relative; transition: background .2s; }
.t-press a:hover, .t-conn a:hover { background: var(--accent-soft); }
.t-press b, .t-conn b { font-size: 14px; color: var(--accent); } .t-press span, .t-conn span { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.t-conn .arr { position: absolute; top: 10px; inset-inline-end: 12px; color: var(--accent); }
.bd-next { margin-top: 26px; text-align: center; }
html[lang="ar"] .bd-next .label { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }
.bd-next > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.nx { font: 500 14px var(--font-en); padding: 9px 16px; border-radius: 999px; border: 1px dashed var(--line-strong); background: var(--card); color: var(--text); cursor: pointer; }
html[lang="ar"] .nx { font-family: var(--font-ar); }
.nx:hover { border-style: solid; border-color: var(--accent); color: var(--accent); }

@media (max-width: 980px) {
  html[data-view="agent"] .page-home > section.ws { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .ws-rail { order: 2; border: 0; border-top: 1px solid var(--line); max-height: 42vh; }
  .ws-me { display: none; }
  .ws-feed { padding: 10px; }
  .ws-intents { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { grid-template-columns: 1fr; } .s2, .s3, .s4, .s6 { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .tile, .wi, .ws-cursor { animation: none !important; transition: none !important; } }
.ws-cursor[hidden], .ws-board[hidden], .ws-empty[hidden] { display: none !important; }
html[lang="ar"] .t-line .when { font-family: var(--font-ar); font-size: 13px; }
/* stats that always fit their tile */
.tile { container-type: inline-size; }
.t-stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
.t-stats div { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.t-stats b { font-size: clamp(20px, 9cqi, 34px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.t-stats.big b { font-size: clamp(24px, 11cqi, 44px); }
.t-stats .word b { font-size: clamp(16px, 6cqi, 22px); white-space: normal; }
.t-stats span { line-height: 1.5; margin-top: 4px; }
@container (max-width: 300px) { .t-stats { grid-template-columns: 1fr; } .t-stats div { flex-direction: row; align-items: baseline; gap: 10px; text-align: start; } }
/* each stat sizes its number to its own width */
.t-stats > div { container-type: inline-size; }
.t-stats b, .t-stats.big b { font-size: min(44px, 21cqi); overflow: visible; text-overflow: clip; }
.t-stats .word b { font-size: min(22px, 11cqi); }

/* ---------- section picker (first screen) ---------- */
.ws-secs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.sec { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 14px; cursor: pointer;
  font: 600 15px var(--font-en); color: var(--text); background: var(--card); border: 1.5px solid var(--line);
  transition: transform .2s, border-color .2s, background .2s, color .2s; animation: wiIn .5s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--n) * .035s); }
html[lang="ar"] .sec { font-family: var(--font-ar); }
.sec .ic { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: 13px; }
.sec .ck { width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; background: var(--raised); color: transparent; transition: all .2s; }
.sec:hover { transform: translateY(-2px); border-color: var(--accent); }
.sec.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.sec.on .ck { background: var(--accent); color: var(--accent-ink); transform: scale(1.1); }
.sec.all { border-style: dashed; color: var(--text-2); font-weight: 500; }
.ws-pick { display: flex; gap: 10px; max-width: 640px; margin: 22px auto 0; padding: 8px; border-radius: 18px; background: var(--card); border: 1.5px solid var(--line-strong); }
.ws-pick:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ws-pick input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--text); font: 400 15px var(--font-en); padding: 0 10px; }
html[lang="ar"] .ws-pick input { font-family: var(--font-ar); }
.ws-pick .go { height: 46px; padding: 0 22px; border: 0; border-radius: 13px; background: var(--accent); color: var(--accent-ink); font: 700 15px var(--font-en); cursor: pointer; white-space: nowrap; transition: opacity .2s, transform .2s; }
html[lang="ar"] .ws-pick .go { font-family: var(--font-ar); }
.ws-pick .go:disabled { opacity: .35; cursor: not-allowed; }
.ws-pick .go:not(:disabled):hover { transform: translateY(-1px); }
.ws-me { position: relative; }
.ws-newbtn { margin-inline-start: auto; font-family: var(--font-ar); }
html[lang="en"] .ws-newbtn { font-family: var(--font-en); }

/* edit: tiles leaving the board */
.tile.leaving { animation: tileOut .35s ease-in forwards; }
@keyframes tileOut { to { opacity: 0; transform: scale(.94); } }

/* new tile kinds */
.t-skills { display: flex; flex-direction: column; gap: 12px; }
.sg b { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.sg div { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-chip { font: 500 12px var(--font-en); padding: 4px 10px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.t-line.edu li { padding: 10px 12px; border-radius: 12px; background: var(--raised); }
.t-ws-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.t-ws-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; display: block; }
@media (max-width: 980px) { .ws-pick { flex-direction: column; } }
.ws-newbtn[hidden], .tbtn[hidden] { display: none !important; }
.ws-pick { width: 100%; box-sizing: border-box; }
.ws-secs.ready .sec { animation: none; }
.sec.on { background: color-mix(in srgb, var(--accent) 20%, var(--card)); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ===================== staged flow: intro → pick → build → reveal ===================== */
html[data-view="agent"] .page-home > section.ws { grid-template-columns: 1fr; }
.ws-rail { display: none !important; }
.ws-canvas { padding-bottom: 120px; }
.ws-intro[hidden], .ws-build[hidden], .ws-dock[hidden] { display: none !important; }

/* 1 · intro */
.ws-intro { min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.ia { position: relative; width: 200px; height: 200px; animation: introPop .9s cubic-bezier(.16,1,.3,1) both; }
@keyframes introPop { from { opacity: 0; transform: scale(.6); } }
.ia img { position: absolute; inset: 14px; width: 172px; height: 172px; border-radius: 50%; object-fit: cover; }
.ia svg { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.ia circle { fill: none; stroke-width: 4; }
.ia .trk { stroke: var(--line-strong); }
.ia .rng { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 591; stroke-dashoffset: 591; animation: draw 1.3s .25s cubic-bezier(.65,0,.35,1) forwards; }
.ws-intro h1 { margin: 26px 0 0; font-size: clamp(44px, 7vw, 84px); line-height: 1.15; }
.ws-intro h1 .cursor { display: inline-block; width: .07em; height: .85em; background: var(--accent); vertical-align: -0.06em; margin-inline-start: .06em; animation: blink 1s steps(1) infinite; }
.ws-intro p { display: inline-flex; align-items: center; gap: 10px; margin: 12px 0 0; font-size: 20px; color: var(--text-2); animation: msgIn .7s 1.6s cubic-bezier(.16,1,.3,1) both; }
.ws-intro p .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* 2 · pick: centred full screen (existing .ws-empty) */
.ws[data-stage="pick"] .ws-empty { animation: msgIn .6s cubic-bezier(.16,1,.3,1) both; }

/* 3 · build: the construction site */
.ws-build { max-width: 1100px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 10px 0 30px; position: relative; }
.bb-req { text-align: center; font-size: 18px; color: var(--text-2); margin-bottom: 18px; animation: msgIn .5s both; }
.bb-grid .tile { min-height: 150px; }
.bb-grid .tile.done { border-style: solid; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.bb-grid .tile.done .cells i { animation: none; background: color-mix(in srgb, var(--accent) 22%, var(--raised)); }
.bb-grid .tile.done .tt { color: var(--text); font-weight: 700; font-size: 17px; }
.bb-grid .tile.kept { border-style: solid; opacity: .8; }
.bb-grid .tile.ok .vbadge { transform: scale(1); }
.bb-status { position: sticky; bottom: 0; margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; padding: 12px 18px; border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); }
.bb-status .fa { display: inline-grid; grid-template-columns: 22px auto auto; max-width: 340px; }
.bb-time { font-size: 12px; color: var(--text-3); }
.bb-err { color: var(--red-500); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.ws-build.scanning::after { content: ""; position: absolute; left: -10px; right: -10px; height: 80px; top: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 20%, transparent), transparent); border-bottom: 2px solid var(--accent); animation: boardScan 1.3s ease-in-out infinite; }

/* 4 · reveal: the whole page lands at once */
.ws-board.revealing .bd-h, .ws-board.revealing .tile, .ws-board.revealing .bd-next { animation: landIn .9s cubic-bezier(.16,1,.3,1) both; }
.ws-board.revealing .tile { animation-delay: calc(.12s + var(--i, 0) * .05s); }
.ws-board.revealing .bd-next { animation-delay: .5s; }
@keyframes landIn { from { opacity: 0; transform: translateY(40px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.bd-h .label { display: block; margin-bottom: 6px; }
html[lang="ar"] .bd-h .label { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }

/* edit dock */
.ws-dock { position: fixed; z-index: 30; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(720px, calc(100% - 32px)); margin: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,.35); align-items: center; animation: msgIn .6s .6s cubic-bezier(.16,1,.3,1) both; }
.ws-dock .tbtn { flex: none; width: 40px; height: 40px; font-size: 18px; }

/* ===================== editorial page (the revealed result) ===================== */
.ws-board { max-width: 1080px; }
.ed { padding: 8px 0 40px; }
.ed a { text-decoration: none; color: inherit; }
.ar-i { color: var(--accent); font-size: .9em; margin-inline-start: 6px; display: inline-block; transition: transform .2s; }
html[dir="rtl"] .ar-i { transform: scaleX(-1); }
a:hover > .ar-i, a:hover .ar-i { transform: translate(2px, -2px); }
html[dir="rtl"] a:hover .ar-i { transform: scaleX(-1) translate(2px, -2px); }

.ed-hero { padding: 24px 0 40px; border-bottom: 1px solid var(--line); }
.ed-by { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); }
.ed-by img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--accent); }
.ed-by em { font-style: normal; color: var(--text-3); }
.ed-hero h2 { margin: 22px 0 0; max-width: 20ch; font-size: clamp(36px, 5.2vw, 64px); line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; }
html[lang="ar"] .ed-hero h2 { letter-spacing: 0; line-height: 1.3; max-width: 22ch; }
.ed-hero > p { margin: 18px 0 0; max-width: 62ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.75; color: var(--text-2); }
.ed-toc { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 30px; }
.ed-toc a { display: inline-flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--text-2); padding: 4px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.ed-toc a span { font: 500 11px var(--font-mono); color: var(--accent); }
.ed-toc a:hover { color: var(--text); border-color: var(--accent); }

.ed-sec { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 48px; padding: 56px 0; border-bottom: 1px solid var(--line); }
.ed-side { position: sticky; top: 24px; align-self: start; display: flex; flex-direction: column; gap: 6px; }
.ed-num { font: 500 13px var(--font-mono); color: var(--accent); letter-spacing: .08em; }
.ed-kind { font-size: 15px; font-weight: 600; color: var(--text); }
.ed-ok { font-size: 12px; color: var(--text-3); }
.ed-main h3 { margin: 0; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.25; letter-spacing: -0.01em; }
html[lang="ar"] .ed-main h3 { letter-spacing: 0; line-height: 1.4; }
.ed-intro { margin: 10px 0 0; max-width: 60ch; font-size: 17px; line-height: 1.7; color: var(--text-2); }
.ed-main > :not(h3):not(.ed-intro) { margin-top: 28px; }

/* rows: year | content */
.e-rows { list-style: none; margin: 0; padding: 0; }
.e-rows li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 24px; padding: 20px 0; border-top: 1px solid var(--line); }
.e-rows li:first-child { border-top: 0; padding-top: 4px; }
.e-when { font: 500 13px var(--font-mono); color: var(--text-3); padding-top: 4px; direction: ltr; text-align: start; }
html[lang="ar"] .e-when { font-family: var(--font-ar); font-size: 14px; direction: rtl; }
.e-what b { display: block; font-size: 18px; line-height: 1.4; }
.e-org { display: block; margin-top: 2px; font-size: 15px; color: var(--accent); }
.e-what p { margin: 6px 0 0; font-size: 15px; line-height: 1.7; color: var(--text-2); max-width: 60ch; }
.e-link { display: inline-flex; align-items: center; margin-top: 8px; font-size: 14px; color: var(--accent) !important; }
.e-said { color: var(--text-3); }

/* projects: two-up with real screenshots */
.e-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; }
.e-proj { display: block; }
.e-shot { display: block; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--raised); }
.e-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.e-proj:hover .e-shot img { transform: scale(1.035); }
.e-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; }
.e-ph b { font-size: 18px; }
.e-ph em { font-style: normal; font: 500 12px var(--font-mono); color: var(--accent); white-space: nowrap; }
html[lang="ar"] .e-ph em { font-family: var(--font-ar); font-size: 13px; }
.e-host { display: block; margin-top: 2px; font: 400 12px var(--font-mono); color: var(--text-3); direction: ltr; text-align: start; }
.e-proj p { margin: 8px 0 0; font-size: 15px; line-height: 1.65; color: var(--text-2); }

/* stats strip */
.e-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.e-stats > div { padding: 4px 22px; border-inline-start: 1px solid var(--line); }
.e-stats > div:first-child { border-inline-start: 0; padding-inline-start: 0; }
.e-stats b { display: block; font: 700 clamp(34px, 4vw, 48px) var(--font-en); line-height: 1.1; color: var(--text); letter-spacing: -0.02em; text-align: start; }
.e-stats b.word { font-size: 22px; }
.e-stats span { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); line-height: 1.5; }
.e-init-img { width: 100%; border-radius: 12px; border: 1px solid var(--line); margin-top: 28px; display: block; }
.e-cta { display: inline-flex; align-items: center; margin-top: 18px; font: 500 15px var(--font-mono); color: var(--accent) !important; direction: ltr; }

/* talks */
.e-embed { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.e-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.e-list { list-style: none; margin: 18px 0 0; padding: 0; }
.e-list li a, .e-list li > div { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.e-list img { width: 120px; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: block; }
.e-list b { display: block; font-size: 16px; line-height: 1.45; } .e-list em { display: block; font-style: normal; font-size: 14px; color: var(--text-2); margin-top: 2px; }

/* press */
.e-press { list-style: none; margin: 0; padding: 0; }
.e-press a, .e-press li > div { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); transition: padding .2s; }
.e-press li:first-child a { border-top: 0; }
.e-press a:hover { padding-inline-start: 8px; }
.e-src { font: 500 13px var(--font-mono); color: var(--accent); }
.e-pt { font-size: 16px; line-height: 1.5; }

/* advice */
.e-advice { list-style: none; margin: 0; padding: 0; }
.e-advice li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 12px; padding: 22px 0; border-top: 1px solid var(--line); }
.e-advice li:first-child { border-top: 0; padding-top: 4px; }
.e-n { font: 300 34px var(--font-en); color: var(--accent); line-height: 1; }
.e-advice b { display: block; font-size: 19px; line-height: 1.45; }
.e-advice p { margin: 6px 0 0; font-size: 16px; line-height: 1.75; color: var(--text-2); max-width: 62ch; }

/* skills */
.e-skills { margin: 0; }
.e-skills > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.e-skills > div:first-child { border-top: 0; }
.e-skills dt { font-size: 15px; font-weight: 600; color: var(--text-2); }
.e-skills dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.e-skills dd span { font: 500 13px var(--font-en); padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); }

/* workshops mosaic */
.e-mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.e-mosaic figure { margin: 0; }
.e-mosaic img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; display: block; }
.e-mosaic figcaption { margin-top: 6px; font-size: 13px; color: var(--text-2); }

/* links */
.e-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.e-links a, .e-links li > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.e-links b { font-size: 16px; } .e-links span { grid-column: 1; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.e-links .ar-i { grid-column: 2; grid-row: 1; }
.e-answer { margin: 0; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.75; max-width: 60ch; }

.ed-next { padding: 48px 0 0; text-align: center; }
.ed-next > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px; }
html[lang="ar"] .ed-next .label { font-family: var(--font-ar); font-size: 13px; letter-spacing: 0; }

/* reveal motion for the editorial page */
.ws-board.revealing .ed-hero, .ws-board.revealing .ed-sec, .ws-board.revealing .ed-next { animation: landIn .9s cubic-bezier(.16,1,.3,1) both; }
.ws-board.revealing .ed-sec { animation-delay: calc(.15s + var(--i) * .08s); }

@media (max-width: 860px) {
  .ed-sec { grid-template-columns: 1fr; gap: 14px; padding: 40px 0; }
  .ed-side { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
  .e-projects, .e-links { grid-template-columns: 1fr; }
  .e-rows li, .e-skills > div { grid-template-columns: 1fr; gap: 4px; }
  .e-press a { grid-template-columns: 1fr auto; } .e-press .e-src { grid-column: 1 / -1; }
  .e-mosaic { grid-template-columns: repeat(2, 1fr); }
  .e-list li a { grid-template-columns: 96px 1fr; } .e-list .ar-i { display: none; }
}

/* ================= layout library: designed variants the planner chooses from ================= */
.ed-body > * + * { margin-top: 28px; }

/* page layout · spotlight — the first block is the star */
.lay-spotlight .ed-sec:first-of-type { grid-template-columns: 1fr; gap: 18px; padding-top: 48px; }
.lay-spotlight .ed-sec:first-of-type .ed-side { position: static; flex-direction: row; align-items: baseline; gap: 12px; }
.lay-spotlight .ed-sec:first-of-type h3 { font-size: clamp(28px, 3.4vw, 42px); }
.lay-spotlight .ed-sec:first-of-type .ed-intro { font-size: 18px; }

/* rows · timeline — a vertical line, mint marker on the current role */
.v-timeline .e-rows { position: relative; padding-inline-start: 26px; }
.v-timeline .e-rows::before { content: ""; position: absolute; inset-inline-start: 5px; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(var(--accent), var(--line) 30%); }
.v-timeline .e-rows li { position: relative; grid-template-columns: 1fr; gap: 4px; border-top: 0; padding: 0 0 30px; }
.v-timeline .e-rows li:last-child { padding-bottom: 0; }
.v-timeline .e-rows li::before { content: ""; position: absolute; inset-inline-start: -26px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line-strong); }
.v-timeline .e-rows li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.v-timeline .e-when { padding-top: 0; color: var(--accent); }

/* rows · chapters — big years, narrative */
.v-chapters .e-rows li { grid-template-columns: 200px minmax(0, 1fr); gap: 32px; padding: 30px 0; }
.v-chapters .e-when { font: 300 clamp(30px, 3.4vw, 44px) var(--font-en) !important; line-height: 1; color: var(--text); letter-spacing: -0.02em; padding-top: 0; direction: ltr; }
.v-chapters .e-what b { font-size: 21px; }
.v-chapters .e-what p { font-size: 16px; }

/* projects · showcase — one star, the rest compact */
.v-showcase .e-projects { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 22px; }
.v-showcase .e-proj:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0 32px; align-items: center; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.v-showcase .e-proj:first-child .e-shot { grid-row: 1 / span 3; }
.v-showcase .e-proj:first-child .e-ph b { font-size: 26px; }
.v-showcase .e-proj:first-child p { font-size: 17px; }
.v-showcase .e-proj:not(:first-child) .e-ph b { font-size: 16px; }
.v-showcase .e-proj:not(:first-child) p { font-size: 14px; }

/* projects · list — compact rows */
.v-list .e-projects { grid-template-columns: 1fr; gap: 0; }
.v-list .e-proj { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2px 22px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.v-list .e-proj:first-child { border-top: 0; padding-top: 0; }
.v-list .e-shot { grid-row: 1 / span 3; border-radius: 8px; }
.v-list .e-ph { margin-top: 0; }
.v-list .e-proj p { margin-top: 2px; font-size: 14px; }

/* talks · grid — thumbnail wall */
.e-vgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 26px 20px; }
.e-vgrid .e-shot { position: relative; aspect-ratio: 16/9; }
.e-vgrid .e-play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(9, 14, 22, .7); color: #fff; font-size: 13px; font-style: normal; opacity: 0; transform: scale(.9); transition: opacity .25s, transform .25s; }
.e-vgrid a:hover .e-play { opacity: 1; transform: none; }
.e-vgrid b { display: block; margin-top: 12px; font-size: 15px; line-height: 1.45; }
.e-vgrid em { display: block; margin-top: 4px; font-style: normal; font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* press · wall — big outlet names */
.v-wall .e-press { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.v-wall .e-press a, .v-wall .e-press li > div { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.v-wall .e-press li:nth-child(2) a { border-top: 0; }
.v-wall .e-src { grid-column: 1; font: 700 clamp(20px, 2vw, 26px) var(--font-en); color: var(--text); letter-spacing: -0.01em; }
.v-wall .e-pt { grid-column: 1; font-size: 14px; color: var(--text-2); }
.v-wall .e-press .ar-i { grid-column: 2; grid-row: 1; }

/* advice · quotes — large pull quotes */
.v-quotes .e-advice li { grid-template-columns: 1fr; padding: 30px 0 30px; position: relative; }
.v-quotes .e-n { font: 700 64px/0.6 var(--font-en); color: var(--accent); }
.v-quotes .e-n::before { content: "“"; } .v-quotes .e-n { font-size: 0; }
.v-quotes .e-n::before { font-size: 72px; }
.v-quotes .e-advice b { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.45; font-weight: 600; max-width: 30ch; }
.v-quotes .e-advice p { font-size: 17px; }

/* stats · hero — one huge number */
.v-hero .e-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
.v-hero .e-stats > div:first-child { grid-column: 1 / -1; padding: 0 0 26px; border-bottom: 1px solid var(--line); }
.v-hero .e-stats > div:nth-child(2) { border-inline-start: 0; padding-inline-start: 0; }
.v-hero .e-stats > div:first-child b { font-size: clamp(64px, 9vw, 120px); color: var(--accent); line-height: 1; }
.v-hero .e-stats > div:first-child span { font-size: 18px; }

/* skills · cloud — tags only */
.v-cloud .e-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.v-cloud .e-skills > div { display: contents; }
.v-cloud .e-skills dt { display: none; }
.v-cloud .e-skills dd { display: contents; }
.v-cloud .e-skills dd span { font-size: 15px; padding: 8px 16px; }

/* workshops · gallery — large photos */
.v-gallery .e-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.v-gallery .e-mosaic figure:first-child { grid-column: 1 / -1; }
.v-gallery .e-mosaic img { aspect-ratio: 4/3; border-radius: 14px; }
.v-gallery .e-mosaic figure:first-child img { aspect-ratio: 21/9; }
.v-gallery .e-mosaic figcaption { font-size: 14px; }

@media (max-width: 860px) {
  .v-chapters .e-rows li { grid-template-columns: 1fr; gap: 8px; }
  .v-showcase .e-projects { grid-template-columns: 1fr; }
  .v-showcase .e-proj:first-child { grid-template-columns: 1fr; }
  .v-showcase .e-proj:first-child .e-shot { grid-row: auto; }
  .v-list .e-proj { grid-template-columns: 96px 1fr; }
  .v-wall .e-press { grid-template-columns: 1fr; }
  .v-hero .e-stats { grid-template-columns: 1fr 1fr; }
}
.v-showcase .e-proj:first-child { align-items: start; align-content: center; grid-template-rows: auto auto 1fr; }
.v-showcase .e-proj:first-child .e-ph { display: block; margin-top: 0; }
.v-showcase .e-proj:first-child .e-ph em { display: inline-block; margin-top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); }
.v-showcase .e-proj:first-child .e-ph b { display: block; }
.v-showcase .e-proj:first-child .e-host { margin-top: 10px; }
.v-showcase .e-proj:first-child p { margin-top: 14px; line-height: 1.7; }
.v-showcase .e-proj:only-child { padding-bottom: 0; border-bottom: 0; }
html[dir="rtl"] .e-host { text-align: right; }
.v-gallery .e-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .v-gallery .e-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* org marks + highlights in the AI rows */
.e-what { position: relative; }
.e-mark { float: inline-end; width: 44px; height: 44px; margin-inline-start: 16px; border-radius: 10px; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.e-mark img { width: 78%; height: 78%; object-fit: contain; display: block; }
.e-mark.mono-mark { background: var(--raised); font: 600 14px var(--font-mono); color: var(--text-2); letter-spacing: .02em; }
.e-hl { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.e-hl li { position: relative; padding-inline-start: 18px; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.e-hl li::before { content: ""; position: absolute; inset-inline-start: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.org-logo { height: 22px; width: auto; vertical-align: -4px; margin-inline-end: 10px; border-radius: 4px; background: #fff; padding: 2px; }
.v-chapters .e-mark, .v-timeline .e-mark { width: 38px; height: 38px; }
.e-rows .e-hl li, .v-timeline .e-rows .e-hl li, .v-chapters .e-rows .e-hl li { display: block; grid-template-columns: none; border: 0; padding: 0; padding-inline-start: 18px; }
.e-rows .e-hl li::before, .v-timeline .e-rows .e-hl li::before { inset-inline-start: 2px; top: .7em; width: 6px; height: 6px; background: var(--accent); box-shadow: none; }
.e-what { padding-inline-end: 60px; }
.e-mark { float: none; position: absolute; inset-inline-end: 0; top: 0; margin: 0; }

/* org logos in the journey */
.org-h { display: flex; align-items: center; gap: 14px; }
.org-logo { flex: none; width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; padding: 0; vertical-align: middle; }
.org-logo img { width: 76%; height: 76%; object-fit: contain; display: block; }
.org-logo.dark { background: #0f1a2b; border-color: rgba(255,255,255,.08); }
.e-mark.dark { background: #0f1a2b; }
@media (max-width: 720px) { .org-logo { width: 40px; height: 40px; border-radius: 10px; } }
.org-logo.wide { width: 104px; }
.org-logo.wide img { width: 86%; height: 70%; }
.e-mark.wide { width: 84px; }
.e-what:has(.e-mark.wide) { padding-inline-end: 100px; }
@media (max-width: 720px) { .org-logo.wide { width: 88px; } }
.tbtn .term-i { width: 18px; height: 18px; display: block; }
html[dir="rtl"] .tbtn .term-i { transform: none; }
.tbtn.k:hover .term-i path:last-child { animation: termBlink 1s steps(1) infinite; }
@keyframes termBlink { 50% { opacity: 0; } }

/* ---------- interactive terminal (contact) ---------- */
.contact .tw { margin-top: 40px; max-width: 920px; border-radius: 16px; overflow: hidden; background: #0d131b; border: 1px solid rgba(255,255,255,.09); box-shadow: 0 30px 80px rgba(0,0,0,.35); direction: ltr; text-align: left; color: #d6dde6; font: 14.5px/1.75 var(--font-mono); }
.tw-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; background: #111923; border-bottom: 1px solid rgba(255,255,255,.06); }
.tw-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.tw-bar i:nth-child(2) { background: #febc2e; } .tw-bar i:nth-child(3) { background: #28c840; }
.tw-bar span { flex: 1; text-align: center; margin-inline-end: 52px; font-size: 12px; color: #7c8796; }
.tw-body { height: 360px; overflow-y: auto; padding: 16px 20px 18px; cursor: text; scrollbar-width: thin; scrollbar-color: #2a3644 transparent; }
.tw-out > div { white-space: pre-wrap; word-break: break-word; }
.tw a { color: var(--mint-300); text-decoration: none; } .tw a:hover { text-decoration: underline; }
.t-user { color: var(--mint-400); } .t-path { color: #7cc4ff; } .t-dim { color: #6b7685; } .t-ok { color: var(--mint-300); } .t-os { color: #f5c26b; }
.t-art { color: var(--mint-400); }
.t-sw { display: inline-flex; gap: 0; margin-top: 4px; } .t-sw i { width: 22px; height: 12px; }
.t-sw i:nth-child(1) { background: #0b0f14; } .t-sw i:nth-child(2) { background: #5bcfa5; } .t-sw i:nth-child(3) { background: #c4973b; } .t-sw i:nth-child(4) { background: #7cc4ff; } .t-sw i:nth-child(5) { background: #ef5350; } .t-sw i:nth-child(6) { background: #f3f4f6; }
.tw-line { position: relative; display: flex; align-items: baseline; gap: 8px; }
.tw-line[hidden] { display: none; }
.tw-ps { flex: none; white-space: nowrap; }
.tw-in { flex: 1; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: #f3f4f6; font: inherit; caret-color: var(--mint-400); }
.tw-ghost { position: absolute; pointer-events: none; color: #4a5563; white-space: pre; }
.tw-line .tw-ghost { left: auto; }
.t-caret { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--mint-400); animation: blink 1s steps(1) infinite; }
@media (max-width: 640px) { .tw-body { height: 320px; padding: 12px 14px; } .contact .tw { font-size: 13px; } .tw-bar span { display: none; } }
.j-tag { display: inline-flex; align-items: center; margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px; border: 1px solid rgba(196, 151, 59, .45); background: rgba(196, 151, 59, .1); color: var(--second); font-size: 12.5px; font-weight: 600; vertical-align: 1px; white-space: nowrap; }

/* ---------- short lessons (Facebook reels, click to play) ---------- */
.reels { padding-top: 90px; }
.reel-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 14px; margin-top: 30px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.reel { position: relative; aspect-ratio: 9/16; border-radius: 18px; overflow: hidden; scroll-snap-align: start; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; padding: 16px; text-align: start; cursor: pointer; color: #fff; font: inherit;
  background: radial-gradient(120% 70% at 50% 0%, rgba(91,207,165,.35), transparent 60%), linear-gradient(180deg, #13202a, #0b0f14); transition: transform .25s, border-color .25s; }
.reel:nth-child(3n+2) { background: radial-gradient(120% 70% at 50% 0%, rgba(196,151,59,.32), transparent 60%), linear-gradient(180deg, #1c1a14, #0b0f14); }
.reel:nth-child(3n) { background: radial-gradient(120% 70% at 50% 0%, rgba(124,196,255,.28), transparent 60%), linear-gradient(180deg, #121a26, #0b0f14); }
.reel:hover { transform: translateY(-4px); border-color: var(--accent); }
.reel-tag { position: absolute; top: 14px; inset-inline-start: 14px; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.12); font: 600 10.5px var(--font-mono); letter-spacing: .1em; }
.reel-play { position: absolute; top: 38%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: var(--mint-400); box-shadow: 0 0 0 10px rgba(91,207,165,.18); }
.reel-play::after { content: ""; position: absolute; left: 23px; top: 18px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #0b0f14; }
.reel:hover .reel-play { box-shadow: 0 0 0 14px rgba(91,207,165,.22); }
.reel-t { font-size: 16px; font-weight: 700; line-height: 1.45; }
.reel-by { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; opacity: .8; }
.reel-by img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.reel.playing { padding: 0; background: #000; cursor: default; }
.reel.playing iframe { width: 100%; height: 100%; border: 0; }
.reel-note { margin: 10px 0 0; font-size: 12.5px; color: var(--text-3); }
.reel .reel-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.reel.has-img::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,12,18,.15) 0%, rgba(8,12,18,.05) 35%, rgba(8,12,18,.85) 75%, rgba(8,12,18,.95) 100%); }
.reel.has-img > :not(.reel-img) { position: relative; z-index: 2; }
.reel.has-img .reel-tag { position: absolute; }
.reel.has-img .reel-play { position: absolute; width: 50px; height: 50px; margin: -25px 0 0 -25px; opacity: .92; }
.reel.has-img .reel-play::after { left: 19px; top: 15px; border-width: 10px 0 10px 15px; }
.reel.has-img:hover .reel-img { transform: scale(1.04); }
.reels { padding-top: 0; }

/* ---------- denser reading: wider page, smaller scale, and the section title stays with you ---------- */
.wrap { max-width: 1280px; }
.hero .wrap { max-width: 1080px; }   /* the landing (name, who I am) keeps its original size */
section.s { padding: 56px 0; }
/* the title of the section you're in sticks under the header until that section ends */
section.s .sh { position: sticky; top: 64px; z-index: 6; margin: 0 -24px 22px; padding: 14px 24px 12px;
  background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); }
section.s .sh h2 { font-size: clamp(24px, 2.6vw, 32px); }
/* on bigger screens everything is drawn a little smaller, so more fits at once */
@media (min-width: 1100px) {
  section.s { zoom: .88; }
  section.s .sh { top: calc(64px / .88); }
}
