/* Zanjireh — companions (همراه‌ها), shared by the web app and the site section. */
.hm-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.hm { position: relative; display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: 22px; border: 1px solid var(--border); background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--a) 14%, transparent), transparent 60%), var(--tint-1); transition: transform var(--t-2) var(--ease), border-color var(--t-2); }
.hm:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--a) 50%, transparent); }
.hm__ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--a) 18%, transparent); color: var(--a); }
:root[data-theme="light"] .hm__ic { color: color-mix(in srgb, var(--a) 55%, #0A1517); }
.hm__ic svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hm__ic--lg { width: 72px; height: 72px; border-radius: 22px; flex: none; }
.hm__ic--lg svg { width: 36px; height: 36px; }
.hm b { font-size: 1.1rem; font-weight: 900; }
.hm p { color: var(--text-2); font-size: .85rem; line-height: 1.8; }
.hm__f { display: flex; gap: 6px; align-items: center; font-size: .7rem; }
.hm__f i { font-style: normal; padding: 2px 8px; border-radius: 999px; background: var(--tint-3); color: var(--text-2); }
.hm__f em { font-style: normal; margin-inline-start: auto; color: var(--text-3); }
.hm-back { display: inline-block; color: var(--text-3); font-size: var(--fs-0); margin-bottom: 14px; }
.hm-head { display: flex; gap: 18px; align-items: center; margin-bottom: 16px; }
.hm-head h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); font-weight: 900; }
.hm-head p { color: var(--text-2); max-width: 60ch; }
.hm-safe { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hm-safe span { font-size: .78rem; padding: 6px 12px; border-radius: 12px; background: rgba(255, 122, 138, .08); border: 1px solid rgba(255, 122, 138, .3); color: var(--text-2); }
.hm-work { display: grid; gap: 14px; align-items: start; }
@media (min-width: 1000px) { .hm-work { grid-template-columns: 1fr 1.1fr; } }
.hm-drop { display: grid; justify-items: center; gap: 6px; padding: 22px; border-radius: 18px; border: 1.5px dashed var(--border-2); background: var(--tint-1); text-align: center; cursor: pointer; }
.hm-drop small { color: var(--text-3); font-size: .74rem; }
.hm-drop__ic svg { width: 26px; height: 26px; fill: none; stroke: var(--a, var(--accent)); stroke-width: 2; }
.hm-drop img { max-height: 180px; border-radius: 12px; margin-top: 8px; }
.hm-drop.has { border-style: solid; border-color: var(--a, var(--accent)); }
.hm-send { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hm-out { min-height: 300px; border-radius: 22px; border: 1px solid var(--border); background: var(--tint-1); }
.hm-out .empty svg { width: 48px; height: 48px; fill: none; stroke: var(--accent); stroke-width: 1.4; }
.hm-ans { padding: 22px; animation: viewin .5s var(--ease); }
.hm-ans__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.hm-ans__h b { font-size: 1.1rem; }
.hm-urg { font-size: .74rem; font-weight: 800; padding: 3px 12px; border-radius: 999px; }
.hm-urg--ok { background: rgba(20, 224, 161, .14); color: #0B8F6E; }
.hm-urg--warn { background: rgba(255, 194, 122, .2); color: #B87A22; }
.hm-urg--risk { background: rgba(255, 122, 138, .18); color: #C23F52; }
:root[data-theme="dark"] .hm-urg--ok { color: var(--z-emerald); }
:root[data-theme="dark"] .hm-urg--warn { color: var(--z-amber); }
:root[data-theme="dark"] .hm-urg--risk { color: #FF9AA8; }
.hm-sec { margin-top: 14px; animation: viewin .5s var(--ease) both; }
.hm-sec h4 { font-size: .85rem; color: var(--a); margin: 0 0 6px; }
:root[data-theme="light"] .hm-sec h4 { color: color-mix(in srgb, var(--a) 55%, #0A1517); }
.hm-sec ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 5px; color: var(--text-2); font-size: .92rem; line-height: 1.8; }
.hm-note { margin-top: 16px; font-size: .74rem; color: var(--text-3); padding-inline-start: 10px; border-inline-start: 2px solid var(--border-2); }
.hm-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.hm-typing { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: .85rem; }
.hm-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: pulse 1s infinite; }
.hm-typing i:nth-child(2) { animation-delay: .15s; } .hm-typing i:nth-child(3) { animation-delay: .3s; }
.hm-typing span { margin-inline-start: 6px; }
@keyframes viewin { from { opacity: 0; transform: translateY(10px); } }
@keyframes pulse { 50% { opacity: .4; } }
/* follow-up conversation */
.hm-you { margin: 14px 0 6px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2, rgba(255,255,255,.04)); border: 1px solid var(--border); font-size: .92rem; }
.hm-you span { color: var(--text-3); margin-inline-end: 4px; }
.hm-out .hm-ans + .hm-you, .hm-out .hm-ans + .hm-ans { margin-top: 14px; }
.hm-fu { display: flex; gap: 10px; align-items: flex-end; margin-top: 14px; }
.hm-fu textarea { flex: 1; height: auto; padding: 12px 16px; resize: vertical; }
.hm-err b { line-height: 1.9; }
/* free guides first */
.hm-guides { margin-bottom: 14px; }
.hm-guides b { display: block; font-size: .86rem; color: var(--text-3); margin-bottom: 8px; }
.hm-guides div { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-guides .chip { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--tint-1); color: var(--text); font-size: .82rem; cursor: pointer; }
.hm-guides .chip:hover { border-color: var(--a, #2AD6D9); }
.hm-free { margin-bottom: 10px; }
.hm-free span { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(20, 224, 161, .12); color: #14E0A1; font-size: .8rem; }
html[data-theme="light"] .hm-free span { color: #0A8F66; }
.hm-out .hm-ans + .hm-ans { margin-top: 12px; }
.hm-more { margin-top: 16px; padding: 16px; border-radius: 16px; border: 1px dashed var(--border-2); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hm-more p { margin: 0; color: var(--text-2, inherit); }
.ai-hit { margin: 0 0 10px; padding: 12px 14px; border-inline-start: 3px solid var(--a, #2AD6D9); border-radius: 10px; background: var(--tint-1); line-height: 1.9; }
