/* Archive page — additions on top of Omar's site.css + Tailwind. Same language: monochrome, big radii, soft shadows. */

.arc-tabs { scrollbar-width: none; }
.arc-tabs::-webkit-scrollbar { display: none; }
.arc-tab {
    display: inline-flex; align-items: center; white-space: nowrap;
    padding: .7rem 1.25rem; border-radius: 9999px;
    font-size: 15px; font-weight: 500; color: #52525b;
    transition: background-color .3s, color .3s;
}
.arc-tab:hover { color: #09090b; background: #f5f5f4; }
.arc-tab.is-active { background: #09090b; color: #fff; }

/* filters */
.arc-filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.arc-search {
    flex: 1 1 18rem; display: flex; align-items: center; gap: .6rem;
    padding: 0 1.1rem; height: 3rem; border-radius: 9999px;
    background: #fff; border: 1px solid rgba(0,0,0,.08); color: #71717a;
}
.arc-search:focus-within { border-color: #09090b; }
.arc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: #09090b; }
.arc-field select {
    height: 3rem; padding: 0 1.1rem 0 2.4rem; border-radius: 9999px; font-size: 15px; color: #18181b;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat left .9rem center / 1rem;
    border: 1px solid rgba(0,0,0,.08); appearance: none; -webkit-appearance: none; cursor: pointer;
}
.arc-field select:focus { outline: 0; border-color: #09090b; }
.arc-check { display: inline-flex; align-items: center; gap: .5rem; height: 3rem; padding: 0 1.1rem; border-radius: 9999px;
    background: #fff; border: 1px solid rgba(0,0,0,.08); font-size: 15px; color: #18181b; cursor: pointer; }
.arc-check input { accent-color: #09090b; width: 1rem; height: 1rem; }

/* buttons + links */
.arc-btn {
    display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.25rem; border-radius: 9999px;
    border: 1px solid rgba(0,0,0,.1); background: #f5f5f4; color: #09090b; font-size: 14px; font-weight: 500;
    transition: background-color .3s, color .3s, border-color .3s;
}
.arc-btn:hover { background: #09090b; border-color: #09090b; color: #fff; }
.arc-btn--dark { background: #09090b; border-color: #09090b; color: #fff; height: 3rem; padding: 0 1.5rem; }
.arc-btn--dark:hover { background: #27272a; }
.arc-link { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0,0,0,.25); }
.arc-link:hover { text-decoration-color: currentColor; }

/* cards */
.arc-card {
    position: relative; overflow: hidden; border-radius: 2rem; border: 1px solid rgba(0,0,0,.05);
    background: rgba(255,255,255,.75); padding: 1.5rem; box-shadow: 0 20px 50px rgba(15,23,42,.06);
    transition: transform .5s, border-color .5s;
}
.arc-card:hover { transform: translateY(-4px); border-color: rgba(0,0,0,.1); }
.arc-stretch::after { content: ""; position: absolute; inset: 0; }
.arc-stretch:focus-visible { outline: 0; }
.arc-stretch:focus-visible::after { outline: 2px solid #09090b; outline-offset: -2px; border-radius: 2rem; }
.arc-thumb { width: 5.5rem; height: 5.5rem; flex-shrink: 0; object-fit: cover; border-radius: 1.1rem; border: 1px solid rgba(0,0,0,.05); background: #f5f5f4; }

.arc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; font-size: 14px; color: #52525b; }
.arc-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .7rem; border-radius: 9999px;
    border: 1px solid rgba(0,0,0,.1); background: #fff; font-size: 12.5px; font-weight: 500; color: #18181b; }
.arc-pill--soft { background: #f5f5f4; border-color: transparent; }
.arc-chip { padding: .15rem .7rem; border-radius: 9999px; background: #f5f5f4; font-size: 13px; color: #3f3f46; position: relative; z-index: 1; }
.arc-chip:hover { background: #09090b; color: #fff; }

/* forecast status — the only colour on the page, kept muted */
.arc-st { display: inline-flex; align-items: center; padding: .15rem .7rem; border-radius: 9999px; font-size: 12.5px; font-weight: 600; }
.arc-st--hit  { background: #ecfdf3; color: #166534; }
.arc-st--miss { background: #fef2f2; color: #991b1b; }
.arc-st--wait { background: #f4f4f5; color: #52525b; }

/* detail (page + side panel) */
.arc-prose { font-size: 17px; line-height: 2; color: #27272a; overflow-wrap: anywhere; }
.arc-prose p + p { margin-top: 1rem; }
.arc-mini { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: 1rem 1.1rem; border-radius: 1.5rem;
    background: #f5f5f4; border: 1px solid transparent; transition: border-color .3s; }
.arc-mini:hover { border-color: rgba(0,0,0,.15); }
.arc-mini__q { flex-basis: 100%; font-size: 15px; line-height: 1.8; color: #3f3f46; }
.arc-kv { display: grid; grid-template-columns: max-content 1fr; gap: .75rem 1.25rem; font-size: 15px; line-height: 1.8; }
.arc-kv dt { color: #71717a; }
.arc-kv dd { color: #18181b; }
@media (max-width: 480px) { .arc-kv { grid-template-columns: 1fr; gap: .1rem; } .arc-kv dd { margin-bottom: .6rem; } }

.arc-chart { width: 100%; height: auto; display: block; }
.arc-chart__line { fill: none; stroke: #09090b; stroke-width: 2; stroke-linejoin: round; }
.arc-chart__target { stroke: #a1a1aa; stroke-width: 1.2; stroke-dasharray: 5 5; }
.arc-chart__pub { stroke: #d4d4d8; stroke-width: 1.2; }
.arc-chart__dot { fill: #fff; stroke: #09090b; stroke-width: 2; }
.arc-chart, .arc-chart text { direction: ltr; unicode-bidi: isolate; }
.arc-chart__label { font: 600 16px Inter, sans-serif; fill: #52525b; }
.arc-chart__axis { display: flex; justify-content: space-between; margin-top: .35rem; padding-inline-end: 13%; font-size: 13px; color: #71717a; }

/* counts panel */
.arc-bars { display: grid; gap: .6rem; margin-top: .9rem; }
.arc-bar { display: grid; grid-template-columns: 6.5rem 1fr 3.2rem; gap: .75rem; align-items: center; font-size: 14.5px; color: #3f3f46; }
.arc-bar i { position: relative; display: block; height: .6rem; border-radius: 9999px; background: #e7e5e4; overflow: hidden; }
.arc-bar i::after { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w); border-radius: 9999px; background: #09090b; }
.arc-bar em { font-style: normal; text-align: left; font-variant-numeric: tabular-nums; color: #18181b; }

/* topic timeline */
.arc-timeline { position: relative; display: grid; gap: 1.1rem; padding-inline-start: 1.25rem; }
.arc-timeline::before { content: ""; position: absolute; inset-block: .5rem; inset-inline-start: .25rem; width: 1px; background: rgba(0,0,0,.12); }
.arc-timeline li { position: relative; }
.arc-timeline li::before { content: ""; position: absolute; top: .45rem; inset-inline-start: -1.25rem; width: .55rem; height: .55rem;
    border-radius: 9999px; background: #09090b; box-shadow: 0 0 0 4px #fff; }
.arc-timeline__date { display: block; font-size: 13px; color: #71717a; }
.arc-timeline__q { display: block; margin-top: .2rem; font-size: 15.5px; line-height: 1.9; color: #27272a; }
.arc-timeline__q:hover { color: #09090b; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0,0,0,.25); }

/* side panel */
.arc-drawer { position: fixed; inset: 0; z-index: 70; }
.arc-drawer[hidden] { display: none; }
.arc-drawer__backdrop { position: absolute; inset: 0; background: rgba(9,9,11,.35); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.arc-drawer__panel {
    position: absolute; inset-block: 0; inset-inline-end: 0; width: min(46rem, 100%); overflow-y: auto; overscroll-behavior: contain;
    background: #fafaf9; box-shadow: 0 30px 80px rgba(15,23,42,.25); padding: 4.5rem 2.25rem 3rem;
    transform: translateX(-100%); transition: transform .35s cubic-bezier(.2,.8,.2,1); outline: 0;
}
[dir="ltr"] .arc-drawer__panel { transform: translateX(100%); }
.arc-drawer.is-open .arc-drawer__backdrop { opacity: 1; }
.arc-drawer.is-open .arc-drawer__panel { transform: none; }
.arc-drawer__close { position: absolute; top: 1.25rem; inset-inline-start: 1.25rem; display: inline-flex; align-items: center; justify-content: center;
    width: 2.75rem; height: 2.75rem; border-radius: 9999px; border: 1px solid rgba(0,0,0,.1); background: #fff; color: #09090b; }
.arc-drawer__close:hover { background: #09090b; color: #fff; }
.arc-drawer__close svg { width: 1.25rem; height: 1.25rem; }
.arc-drawer__body.is-loading { opacity: .4; transition: opacity .2s; }
@media (max-width: 640px) { .arc-drawer__panel { padding: 4.25rem 1.25rem 2.5rem; } }
body.arc-lock { overflow: hidden; }

@media (max-width: 767px) {
    .arc-card { padding: 1.25rem; border-radius: 1.75rem; }
    .arc-thumb { width: 4.5rem; height: 4.5rem; }
    .arc-filters > .arc-field, .arc-filters > .arc-check { flex: 1 1 calc(50% - .75rem); }
    .arc-field select { width: 100%; }
    .arc-bar { grid-template-columns: 5.5rem 1fr 2.8rem; }
    .arc-tabs { display: flex; width: 100%; }
    .arc-tab { flex: 1 1 auto; justify-content: center; padding: .65rem .6rem; font-size: 14px; }
}

/* forecasts: asset cards */
.arc-asset { display: flex; flex-direction: column; gap: 1rem; border-radius: 2rem; border: 1px solid rgba(0,0,0,.05);
    background: rgba(255,255,255,.75); padding: 1.6rem; box-shadow: 0 30px 80px rgba(15,23,42,.08); transition: transform .5s, border-color .5s; }
.arc-asset:hover { transform: translateY(-4px); border-color: rgba(0,0,0,.12); }
.arc-spark { width: 100%; height: 5rem; display: block; }
.arc-spark polyline { fill: none; stroke: #09090b; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.arc-spark__dot { fill: none; stroke-linecap: round; stroke-width: 7px; vector-effect: non-scaling-stroke; }
.arc-spark__dot--hit { stroke: #16a34a; } .arc-spark__dot--miss { stroke: #dc2626; } .arc-spark__dot--wait { stroke: #a1a1aa; opacity: .75; }
.arc-asset__foot { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .9rem; font-size: 13px; color: #52525b; }
.arc-asset__foot span { display: inline-flex; align-items: center; gap: .35rem; }
.arc-asset__foot .arc-legend__dot { width: .55rem; height: .55rem; }
.arc-asset__year { font: 600 12px Inter, sans-serif; color: #a1a1aa; }
.arc-asset__go { margin-inline-start: auto; color: #a1a1aa; transition: transform .2s, color .2s; }
.arc-asset:hover .arc-asset__go { color: #09090b; transform: translateX(-3px); }
@media (max-width: 480px) { .arc-asset__foot { flex-wrap: nowrap; gap: .3rem .6rem; font-size: 12.5px; white-space: nowrap; } .arc-asset__foot .arc-legend__dot { width: .5rem; height: .5rem; } }
.arc-round { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 9999px;
    border: 1px solid rgba(0,0,0,.1); background: #fff; color: #09090b; transition: background-color .3s, color .3s; }
.arc-round:hover { background: #09090b; color: #fff; }

/* forecasts: year pills */
.arc-years { display: flex; flex-wrap: wrap; gap: .4rem; }
.arc-years a { padding: .45rem 1rem; border-radius: 9999px; border: 1px solid rgba(0,0,0,.08); background: #fff; font-size: 14px; color: #3f3f46; }
.arc-years a:hover { border-color: #09090b; }
.arc-years a.is-active { background: #09090b; border-color: #09090b; color: #fff; }

/* forecasts: the map */
.arc-map { width: 100%; height: auto; display: block; }
.arc-map, .arc-map text { direction: ltr; unicode-bidi: isolate; }
.arc-map__grid { stroke: rgba(0,0,0,.06); stroke-width: 1; }
.arc-map__price { font: 500 15px Inter, sans-serif; fill: #a1a1aa; }
.arc-map__tick { font: 500 15px 'IBM Plex Sans Arabic', Inter, sans-serif; fill: #a1a1aa; }
.arc-map__line { fill: none; stroke: #09090b; stroke-width: 2; stroke-linejoin: round; }
.arc-map__hit { fill: transparent; }
.arc-map__dot { stroke: #fff; stroke-width: 2.5; transition: r .2s; }
.arc-map__dot--hit { fill: #16a34a; }
.arc-map__dot--miss { fill: #dc2626; }
.arc-map__dot--wait { fill: #a1a1aa; }
.arc-map__pt { cursor: pointer; }
.arc-map__pt:hover .arc-map__dot, .arc-map__pt:focus .arc-map__dot { r: 11; }
.arc-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: 14px; color: #3f3f46; }
.arc-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.arc-legend__dot { width: .75rem; height: .75rem; border-radius: 9999px; display: inline-block; }
.arc-legend__dot--hit { background: #16a34a; } .arc-legend__dot--miss { background: #dc2626; } .arc-legend__dot--wait { background: #a1a1aa; }

/* forecasts: list under the map */
.arc-row { display: grid; grid-template-columns: 8.5rem 1fr auto; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-radius: 1.5rem;
    background: rgba(255,255,255,.75); border: 1px solid rgba(0,0,0,.05); transition: border-color .3s; }
.arc-row:hover { border-color: rgba(0,0,0,.18); }
.arc-row time { font-size: 14px; color: #71717a; }
.arc-row__q { font-size: 15.5px; line-height: 1.8; color: #27272a; }
@media (max-width: 640px) {
    .arc-row { grid-template-columns: 1fr auto; gap: .35rem .75rem; }
    .arc-row__q { grid-column: 1 / -1; grid-row: 2; }
}

.arc-map--m { display: none; }
.arc-map--m .arc-map__price, .arc-map--m .arc-map__tick { font-size: 24px; }
.arc-map--m .arc-map__line { stroke-width: 2.5; }
.arc-map--m .arc-map__dot { stroke-width: 3; }
.arc-map--m .arc-map__pt:hover .arc-map__dot { r: 13; }
@media (max-width: 767px) { .arc-map--d { display: none; } .arc-map--m { display: block; } }
.arc-years { scrollbar-width: none; }
@media (max-width: 640px) { .arc-years { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; } .arc-years a { flex: 0 0 auto; } }

/* side panel: floating close (top, right in Arabic) and floating actions (bottom, left in Arabic) */
.arc-drawer__panel { padding-top: 0; }
.arc-drawer__top { position: sticky; top: 0; z-index: 3; display: flex; justify-content: flex-start; padding: 1.1rem 0 .6rem;
    margin-inline: -.25rem; background: linear-gradient(#fafaf9 70%, rgba(250,250,249,0)); }
.arc-drawer__close { position: static; box-shadow: 0 10px 30px rgba(15,23,42,.12); }
.arc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 2rem; }
.arc-drawer .arc-actions { position: sticky; bottom: 0; z-index: 3; margin-top: 2rem; padding: 1.5rem 0 1.25rem;
    background: linear-gradient(rgba(250,250,249,0), #fafaf9 45%); }
.arc-btn--float { box-shadow: 0 12px 30px rgba(15,23,42,.12); background: #fff; }
.arc-btn--primary { background: #09090b; border-color: #09090b; color: #fff; padding: .8rem 1.5rem; }
.arc-btn--primary:hover { background: #27272a; }
.arc-drawer__panel { padding-bottom: 0; }

/* in-place navigation: soft loading state instead of a page reload */
.arc-app, #arc-results { transition: opacity .2s; }
.arc-app.is-loading, #arc-results.is-loading { opacity: .45; pointer-events: none; }

/* topics: «what he thinks now» cards */
.arc-topic { display: flex; flex-direction: column; border-radius: 2rem; border: 1px solid rgba(0,0,0,.05); background: rgba(255,255,255,.75);
    padding: 1.6rem; box-shadow: 0 30px 80px rgba(15,23,42,.08); }
.arc-topic__label { margin-top: 1.4rem; font-size: 13px; font-weight: 600; color: #71717a; }
.arc-topic__list { display: grid; gap: .5rem; margin-top: .6rem; }
.arc-topic__list a { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: .75rem; align-items: baseline; padding: .7rem .9rem;
    border-radius: 1.1rem; background: #fafaf9; border: 1px solid transparent; transition: border-color .3s; }
.arc-topic__list a:hover { border-color: rgba(0,0,0,.14); }
.arc-topic__list time { font-size: 13px; color: #71717a; white-space: nowrap; }
.arc-topic__list span { font-size: 15px; line-height: 1.8; color: #18181b; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.arc-topic__list em { font: 600 13.5px Inter, sans-serif; font-style: normal; color: #09090b; white-space: nowrap; }
@media (max-width: 640px) {
    .arc-topic { padding: 1.25rem; }
    .arc-topic__list a { grid-template-columns: 1fr auto; }
    .arc-topic__list span { grid-column: 1 / -1; grid-row: 2; }
}

/* ==================================================================== site assistant (own widget)
   Monochrome like the site: black header, stone body, white cards. Motion ≤ 300ms: ease-out in, ease-in out. */
.arc-ai { --ai-ease: cubic-bezier(.16,1,.3,1); --ai-in: cubic-bezier(.4,0,1,1); --ai-ink: #09090b; --ai-line: rgba(0,0,0,.08);
    position: fixed; inset-block-end: 1.5rem; inset-inline-end: 1.5rem; z-index: 60; font-family: "IBM Plex Sans Arabic", Inter, sans-serif; }
.arc-ai svg { width: 1.15rem; height: 1.15rem; flex: none; }
.arc-ai button { -webkit-tap-highlight-color: transparent; }

/* launcher: Omar's face + label; folds into a round ✕ while open */
.arc-ai__launcher { position: relative; display: inline-flex; align-items: center; height: 3.6rem; padding: .3rem; border-radius: 9999px;
    background: var(--ai-ink); color: #fff; box-shadow: 0 18px 40px rgba(15,23,42,.28), 0 2px 6px rgba(15,23,42,.16);
    transition: transform .25s var(--ai-ease), box-shadow .25s, background-color .2s; }
.arc-ai__launcher:hover { transform: translateY(-2px); background: #18181b; box-shadow: 0 26px 54px rgba(15,23,42,.34), 0 2px 6px rgba(15,23,42,.16); }
.arc-ai__launcher:active { transform: scale(.96); }
.arc-ai__launcher:focus-visible { outline: 2px solid var(--ai-ink); outline-offset: 3px; }
.arc-ai__launcher-face { position: relative; display: block; width: 3rem; height: 3rem; }
.arc-ai__launcher-face img { width: 100%; height: 100%; border-radius: 9999px; object-fit: cover; transition: transform .28s var(--ai-ease), opacity .2s; }
.arc-ai__launcher-face i { position: absolute; inset-block-end: 2px; inset-inline-end: 2px; width: .7rem; height: .7rem; border-radius: 9999px;
    background: #22c55e; border: 2px solid var(--ai-ink); transition: opacity .2s; }
.arc-ai__launcher-x { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: rotate(-90deg) scale(.5);
    transition: transform .28s var(--ai-ease), opacity .2s; }
.arc-ai__launcher-x svg { width: 1.35rem; height: 1.35rem; }
.arc-ai__launcher-label { display: grid; grid-template-columns: 1fr; transition: grid-template-columns .3s var(--ai-ease), opacity .2s; }
.arc-ai__launcher-label > span { overflow: hidden; white-space: nowrap; padding-inline: .8rem 1.1rem; font-size: 15px; font-weight: 500; }
.arc-ai.is-open .arc-ai__launcher-face img, .arc-ai.is-open .arc-ai__launcher-face i { opacity: 0; transform: scale(.6); }
.arc-ai.is-open .arc-ai__launcher-x { opacity: 1; transform: none; }
.arc-ai.is-open .arc-ai__launcher-label { grid-template-columns: 0fr; opacity: 0; }

/* one gentle hint per visit */
.arc-ai__nudge { position: absolute; inset-block-end: calc(100% + .75rem); inset-inline-end: 0; display: flex; align-items: center; gap: .25rem;
    padding: .35rem; padding-inline-start: .9rem; border-radius: 1.1rem; background: #fff; border: 1px solid var(--ai-line); white-space: nowrap;
    box-shadow: 0 18px 40px rgba(15,23,42,.14); transform-origin: left bottom; animation: arc-ai-pop .35s var(--ai-ease) both; }
.arc-ai__nudge[hidden] { display: none; }
.arc-ai__nudge.is-leaving { animation: arc-ai-pop-out .18s var(--ai-in) both; }
.arc-ai__nudge-open { font-size: 14px; color: #3f3f46; }
.arc-ai__nudge-open strong { color: var(--ai-ink); font-weight: 600; }
.arc-ai__nudge-x { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 9999px; color: #a1a1aa; transition: background-color .2s, color .2s; }
.arc-ai__nudge-x:hover { background: #f4f4f5; color: var(--ai-ink); }
.arc-ai__nudge-x svg { width: .95rem; height: .95rem; }
.arc-ai.is-open .arc-ai__nudge { display: none; }

/* panel */
.arc-ai__panel { position: absolute; inset-block-end: calc(100% + .9rem); inset-inline-end: 0; display: flex; flex-direction: column;
    width: 25.5rem; height: min(54rem, calc(100dvh - 8rem)); min-height: 24rem; border-radius: 1.75rem; overflow: hidden; background: #fafaf9;
    box-shadow: 0 40px 100px -20px rgba(15,23,42,.4), 0 10px 30px rgba(15,23,42,.1), 0 0 0 1px rgba(0,0,0,.05);
    transform-origin: left bottom; opacity: 0; transform: translateY(16px) scale(.94);
    transition: opacity .15s var(--ai-in), transform .15s var(--ai-in), width .3s var(--ai-ease), height .3s var(--ai-ease); }
[dir="ltr"] .arc-ai__panel, [dir="ltr"] .arc-ai__nudge { transform-origin: right bottom; }
.arc-ai__panel[hidden] { display: none; }
.arc-ai.is-open .arc-ai__panel { opacity: 1; transform: none;
    transition: opacity .2s var(--ai-ease), transform .3s var(--ai-ease), width .3s var(--ai-ease), height .3s var(--ai-ease); }
.arc-ai.is-wide .arc-ai__panel { width: min(40rem, calc(100vw - 3rem)); height: calc(100dvh - 8rem); }

/* header (black) */
.arc-ai__head { position: relative; z-index: 2; display: flex; align-items: center; gap: .7rem; flex: none; padding: .85rem .8rem .85rem 1rem;
    background: var(--ai-ink); color: #fff; }
.arc-ai__grip { display: none; }
.arc-ai__avatar { position: relative; flex: none; width: 2.5rem; height: 2.5rem; }
.arc-ai__avatar img { width: 100%; height: 100%; border-radius: 9999px; object-fit: cover; background: #27272a; box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.arc-ai__avatar i { position: absolute; inset-block-end: 0; inset-inline-end: 0; width: .65rem; height: .65rem; border-radius: 9999px; background: #22c55e; border: 2px solid var(--ai-ink); }
.arc-ai__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.arc-ai__who strong { font-size: 15px; font-weight: 600; }
.arc-ai__who small { font-size: 12px; color: #a1a1aa; }
.arc-ai__icon { flex: none; display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 9999px; color: #d4d4d8;
    transition: background-color .2s, color .2s, transform .2s var(--ai-ease); }
.arc-ai__icon:hover { background: rgba(255,255,255,.1); color: #fff; }
.arc-ai__icon:active { transform: scale(.9); }
.arc-ai__icon[hidden] { display: none; }
.arc-ai__icon--wide svg { width: 1.05rem; height: 1.05rem; }

.arc-ai__scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.arc-ai__scroll::-webkit-scrollbar { width: 6px; }
.arc-ai__scroll::-webkit-scrollbar-thumb { background: #d4d4d8; border-radius: 9999px; }

/* welcome: black hero continuing the header, white cards overlapping it */
.arc-ai__home[hidden] { display: none; }
.arc-ai__hero { padding: .4rem 1.25rem 3.4rem; background: var(--ai-ink); color: #fff; }
.arc-ai__hero h2 { font-size: 1.75rem; font-weight: 600; letter-spacing: -.01em; }
.arc-ai__hero p { margin-top: .2rem; font-size: 14.5px; line-height: 1.7; color: #a1a1aa; }
.arc-ai__cards { display: flex; flex-direction: column; gap: .7rem; margin-top: -2.4rem; padding: 0 1rem 1.1rem; }
.arc-ai.is-open .arc-ai__hero > *, .arc-ai.is-open .arc-ai__cards > * { animation: arc-ai-rise .4s var(--ai-ease) both; }
.arc-ai.is-open .arc-ai__hero p { animation-delay: .03s; }
.arc-ai.is-open .arc-ai__cards > :nth-child(1) { animation-delay: .06s; }
.arc-ai.is-open .arc-ai__cards > :nth-child(2) { animation-delay: .11s; }
.arc-ai.is-open .arc-ai__cards > :nth-child(3) { animation-delay: .16s; }
.arc-ai__topics { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.arc-ai__topics button { padding: .45rem .95rem; border-radius: 9999px; border: 1px solid var(--ai-line); background: #fafaf9; font-size: 14px; color: #18181b;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ai-ease); }
.arc-ai__topics button:hover { background: var(--ai-ink); border-color: var(--ai-ink); color: #fff; }
.arc-ai__topics button:active { transform: scale(.95); }

/* cards (welcome + replies) */
.arc-ai-card { display: block; padding: .95rem 1rem; border-radius: 1.25rem; background: #fff; border: 1px solid var(--ai-line);
    box-shadow: 0 1px 2px rgba(15,23,42,.04); color: #18181b; text-decoration: none; }
a.arc-ai-card { transition: border-color .2s, box-shadow .25s, transform .25s var(--ai-ease); }
a.arc-ai-card:hover { border-color: rgba(0,0,0,.18); box-shadow: 0 14px 34px rgba(15,23,42,.1); transform: translateY(-2px); }
.arc-ai-card__label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .01em; color: #71717a; }
.arc-ai-card__meta { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; margin-top: .45rem; font-size: 12.5px; color: #71717a; }
.arc-ai-card__label + .arc-ai-card__meta { margin-top: .35rem; }
.arc-ai-card__src { padding: .1rem .5rem; border-radius: 9999px; background: #f4f4f5; font: 600 11.5px Inter, sans-serif; color: #3f3f46; }
.arc-ai-card__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-top: .45rem;
    font-size: 14.5px; line-height: 1.75; color: #18181b; }
.arc-ai-card__cta { display: inline-flex; align-items: center; gap: .3rem; margin-top: .6rem; font-size: 13.5px; font-weight: 600; color: var(--ai-ink); }
.arc-ai-card__cta svg { width: .95rem; height: .95rem; transition: transform .25s var(--ai-ease); }
a.arc-ai-card:hover .arc-ai-card__cta svg { transform: translateX(-3px); }
[dir="ltr"] .arc-ai-card__cta svg, [dir="ltr"] .arc-ai-card--list button svg { transform: scaleX(-1); }
.arc-ai-card--list { padding-bottom: .4rem; }
.arc-ai-card--list button { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; margin-top: .3rem; padding: .7rem 0;
    border-top: 1px solid rgba(0,0,0,.06); text-align: start; }
.arc-ai-card__label + button { border-top: 0; }
.arc-ai-card--list button span { display: flex; flex-direction: column; line-height: 1.5; }
.arc-ai-card--list button strong { font-size: 14.5px; font-weight: 600; color: var(--ai-ink); }
.arc-ai-card--list button small { font-size: 12.5px; color: #71717a; }
.arc-ai-card--list button svg { color: #a1a1aa; transition: transform .25s var(--ai-ease), color .2s; }
.arc-ai-card--list button:hover svg { color: var(--ai-ink); transform: translateX(-3px); }
.arc-ai-card__quote { display: block; margin-top: .45rem; font-size: 14.5px; line-height: 1.75; color: #18181b; }
.arc-ai-card__targets { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-top: .65rem; font-size: 12.5px; color: #71717a; }
.arc-ai-card__targets b { padding: .2rem .65rem; border-radius: 9999px; background: var(--ai-ink); color: #fff; font: 600 13px Inter, sans-serif; }
.arc-ai-card__open { padding: .1rem .55rem; border-radius: 9999px; background: #fef3c7; color: #92400e; font-size: 11.5px; font-weight: 600; }
.arc-ai-svc + .arc-ai-svc { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid rgba(0,0,0,.06); }
.arc-ai-svc strong { display: block; font-size: 15px; font-weight: 600; color: var(--ai-ink); }
.arc-ai-svc p { margin-top: .2rem; font-size: 13.5px; line-height: 1.7; color: #52525b; }
.arc-ai-svc a { display: inline-flex; align-items: center; gap: .3rem; margin-top: .45rem; font-size: 13.5px; font-weight: 600; color: var(--ai-ink); }
.arc-ai-svc a:hover { text-decoration: underline; text-underline-offset: 4px; }
.arc-ai-card__wa { display: flex; align-items: center; justify-content: center; gap: .5rem; margin-top: .9rem; height: 2.75rem; border-radius: 9999px;
    background: var(--ai-ink); color: #fff !important; font-size: 14px; font-weight: 500; transition: background-color .2s, transform .2s var(--ai-ease); }
.arc-ai-card__wa:hover { background: #27272a; }
.arc-ai-card__wa:active { transform: scale(.97); }
.arc-ai-card__wa--soft { background: #fff; color: var(--ai-ink) !important; border: 1px solid var(--ai-line); }
.arc-ai-card__wa--soft:hover { background: #f4f4f5; }
.arc-ai-svc__acts { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem .9rem; margin-top: .6rem; }
.arc-ai-svc__acts a { margin-top: 0; }
.arc-ai-svc a.arc-ai-svc__go { height: 2.25rem; padding: 0 1rem; border-radius: 9999px; background: var(--ai-ink); color: #fff !important; font-weight: 500;
    text-decoration: none; transition: background-color .2s, transform .2s var(--ai-ease); }
.arc-ai-svc a.arc-ai-svc__go:hover { background: #27272a; text-decoration: none; }
.arc-ai-svc a.arc-ai-svc__go:active { transform: scale(.97); }

/* conversation */
.arc-ai__log { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.1rem 1rem .6rem; }
.arc-ai__log:empty { display: none; }
.arc-ai__msg { font-size: 14.5px; line-height: 1.8; overflow-wrap: anywhere; }
.arc-ai__msg.is-new { animation: arc-ai-rise .28s var(--ai-ease) both; }
.arc-ai__msg--user { align-self: flex-end; max-width: 85%; padding: .6rem 1rem; border-radius: 1.25rem 1.25rem 1.25rem .4rem; background: var(--ai-ink); color: #fff; white-space: pre-wrap; }
[dir="ltr"] .arc-ai__msg--user { border-radius: 1.25rem 1.25rem .4rem 1.25rem; }
.arc-ai__msg--bot { display: flex; align-items: flex-start; gap: .6rem; }
.arc-ai__msg--bot > img { flex: none; width: 1.75rem; height: 1.75rem; margin-top: .15rem; border-radius: 9999px; object-fit: cover; }
.arc-ai__body { flex: 1; min-width: 0; color: #18181b; }
.arc-ai__body p + p { margin-top: .55rem; }
.arc-ai__body strong { font-weight: 600; color: var(--ai-ink); }
.arc-ai__body a:not(.arc-ai-card):not(.arc-ai-card__wa):not(.arc-ai-src):not(.arc-ai-svc__go) { color: var(--ai-ink); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(9,9,11,.3); text-underline-offset: 4px; }
.arc-ai__body .arc-ai-card { margin-top: .7rem; animation: arc-ai-rise .32s var(--ai-ease) both; }
.arc-ai__msg--error .arc-ai__body { color: #991b1b; }
.arc-ai__msg--error button { margin-inline-start: .35rem; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.arc-ai__body.is-streaming p:last-of-type::after { content: ""; display: inline-block; width: .45rem; height: 1em; margin-inline-start: .2rem; vertical-align: -.15em;
    border-radius: 2px; background: var(--ai-ink); animation: arc-ai-caret 1s steps(2) infinite; }
.arc-ai__typing { display: inline-flex; gap: .3rem; padding: .55rem .1rem; }
.arc-ai__typing i { width: .45rem; height: .45rem; border-radius: 9999px; background: #71717a; animation: arc-ai-dot 1.1s ease-in-out infinite; }
.arc-ai__typing i:nth-child(2) { animation-delay: .15s; }
.arc-ai__typing i:nth-child(3) { animation-delay: .3s; }
.arc-ai__chips { display: flex; flex-wrap: wrap; gap: .45rem; padding-inline-start: 2.35rem; }
.arc-ai__chips button { padding: .45rem .9rem; border-radius: 9999px; border: 1px solid rgba(0,0,0,.12); background: #fff; font-size: 13.5px; color: #18181b;
    animation: arc-ai-rise .3s var(--ai-ease) both; transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ai-ease); }
.arc-ai__chips button:nth-child(2) { animation-delay: .05s; }
.arc-ai__chips button:nth-child(3) { animation-delay: .1s; }
.arc-ai__chips button:hover { background: var(--ai-ink); border-color: var(--ai-ink); color: #fff; }
.arc-ai__chips button:active { transform: scale(.95); }

/* composer */
.arc-ai__composer { flex: none; padding: .7rem .9rem .75rem; background: #fafaf9; border-top: 1px solid rgba(0,0,0,.06); }
.arc-ai__box { display: flex; align-items: flex-end; gap: .5rem; padding: .3rem; padding-inline-start: 1rem; border-radius: 1.6rem;
    border: 1px solid rgba(0,0,0,.1); background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: border-color .2s, box-shadow .2s; }
.arc-ai__box:focus-within { border-color: var(--ai-ink); box-shadow: 0 0 0 4px rgba(9,9,11,.06); }
.arc-ai__box textarea { flex: 1; min-width: 0; max-height: 8.5rem; padding: .6rem 0; border: 0; outline: 0; resize: none; background: transparent;
    font: inherit; font-size: 15px; line-height: 1.6; color: var(--ai-ink); }
.arc-ai__box textarea::placeholder { color: #a1a1aa; }
.arc-ai__send { flex: none; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 9999px; background: var(--ai-ink); color: #fff;
    transition: background-color .2s, color .2s, transform .2s var(--ai-ease); }
[dir="ltr"] .arc-ai__send svg { transform: scaleX(-1); }
.arc-ai__send:hover:not(:disabled) { background: #27272a; transform: scale(1.06); }
.arc-ai__send:active:not(:disabled) { transform: scale(.92); }
.arc-ai__send:disabled { background: #e4e4e7; color: #a1a1aa; cursor: default; }
.arc-ai__note { margin-top: .5rem; text-align: center; font-size: 11.5px; color: #a1a1aa; }
.arc-ai__note a { color: #52525b; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.arc-ai__note .is-warn { color: #b45309; font-weight: 500; }

@keyframes arc-ai-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes arc-ai-pop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes arc-ai-pop-out { to { opacity: 0; transform: translateY(6px) scale(.95); } }
@keyframes arc-ai-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
@keyframes arc-ai-caret { 0% { opacity: 1; } 100% { opacity: 0; } }

/* phone: full-height sheet sliding up; drag the header down to close */
@media (max-width: 640px) {
    .arc-ai { inset-block-end: 1rem; inset-inline-end: 1rem; }
    .arc-ai__launcher-face { width: 2.8rem; height: 2.8rem; }
    .arc-ai__launcher { height: 3.4rem; }
    .arc-ai__panel, .arc-ai.is-wide .arc-ai__panel { position: fixed; inset: auto 0 0 0; width: 100%; height: var(--arc-ai-vh, 100dvh); min-height: 0;
        border-radius: 0; opacity: 1; transform: translateY(100%); transition: transform .22s var(--ai-in); }
    .arc-ai.is-open .arc-ai__panel { transform: translateY(var(--arc-ai-drag, 0px)); transition: transform .32s var(--ai-ease); }
    .arc-ai.is-dragging .arc-ai__panel { transition: none; }
    .arc-ai.is-open .arc-ai__launcher { opacity: 0; pointer-events: none; transform: scale(.8); }
    .arc-ai__head { padding-top: 1.3rem; touch-action: none; user-select: none; -webkit-user-select: none; }
    .arc-ai__grip { display: block; position: absolute; top: .5rem; left: 50%; width: 2.5rem; height: .3rem; margin-left: -1.25rem; border-radius: 9999px; background: #3f3f46; }
    .arc-ai__icon--wide { display: none; }
    .arc-ai__composer { padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
    .arc-ai__box textarea { font-size: 16px; }   /* iOS: no zoom on focus */
}
body.arc-ai-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
    .arc-ai *, .arc-ai *::before, .arc-ai *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* assistant: sources under a reply (small, like citations) */
.arc-ai__sources { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .6rem; animation: arc-ai-rise .3s var(--ai-ease) both; }
.arc-ai__sources > span { font-size: 11.5px; color: #a1a1aa; margin-inline-end: .1rem; }
.arc-ai-src { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .45rem .22rem .6rem; border-radius: 9999px; background: #fff;
    border: 1px solid rgba(0,0,0,.1); font-size: 12px; color: #3f3f46; line-height: 1.4; transition: background-color .2s, border-color .2s, color .2s; }
.arc-ai-src b { font-weight: 600; color: var(--ai-ink); font-family: Inter, "IBM Plex Sans Arabic", sans-serif; }
.arc-ai-src svg { width: .8rem; height: .8rem; opacity: .5; }
.arc-ai-src:hover { background: var(--ai-ink); border-color: var(--ai-ink); color: #fff; }
.arc-ai-src:hover b { color: #fff; }
.arc-ai__hero small { display: block; margin-top: .35rem; font-size: 11.5px; color: #71717a; }
.arc-ai-card--contact { padding: .4rem; }
.arc-ai-card--contact .arc-ai-card__wa { margin-top: 0; }
.arc-prose .arc-figure { display: block; width: 100%; height: auto; margin: 1.4rem 0; border-radius: 1.25rem; border: 1px solid rgba(0,0,0,.06); background: #f5f5f4; }

/* assistant: «AI» badge on Omar's photo (replaces the green dot) — his face + a small «AI»: an AI that speaks from his posts */
.arc-ai__avatar i.arc-ai__badge, .arc-ai__launcher-face i.arc-ai__badge {
    display: grid; place-items: center; width: auto; height: 1rem; padding: 0 .28rem; inset-block-end: -3px; inset-inline-end: -6px;
    background: #fff; color: #09090b; border: 1.5px solid #09090b; border-radius: 9999px;
    font: 700 8.5px/1 Inter, system-ui, sans-serif; font-style: normal; letter-spacing: .02em; }
.arc-ai__launcher-face i.arc-ai__badge { inset-block-end: -1px; inset-inline-end: -5px; }
.arc-ai__note a { white-space: nowrap; }
