/* The help page: one column over the site's night sky. Spacing in steps of 4px; text 17px (small 15px). */
:root { --field: #0c0918; --card2: #231b3d; --ok: #9be29b; --bad: #ffa595; --soft: #ffffff14; }
body { background: radial-gradient(ellipse 90% 45% at 50% -10%, #3a2a5e 0, #1a1330 55%, var(--bg) 100%) fixed var(--bg); }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.help { max-width: 760px; margin: 0 auto; padding-bottom: 24px; }
.small { font-size: 15px; color: var(--dim); line-height: 1.55; margin: 0; }
.link { font: inherit; background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.grow { flex: 1; }

/* ---------- the head: title, search, topics ---------- */
.hhead { text-align: center; padding: 12px 0 8px; }
.hhead h1 { font-size: clamp(30px, 6vw, 42px); margin: 8px 0 4px; text-shadow: 0 0 22px #ff9a3c55; }
.lead { color: var(--dim); margin: 0 0 20px; }
.search { position: relative; display: block; max-width: 520px; margin: 0 auto 16px; }
.search svg { position: absolute; inset-inline-start: 14px; top: 50%; width: 20px; height: 20px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search input { width: 100%; font: inherit; color: var(--text); background: var(--field); border: 1px solid var(--line); border-radius: 99px; padding: 12px 18px; padding-inline-start: 44px; }
.search input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px #ffb35c33; }
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.cats a { font-size: 15px; color: var(--text); text-decoration: none; background: var(--soft); border: 1px solid #ffffff1f; border-radius: 99px; padding: 4px 14px; }
.cats a:hover { border-color: var(--line); color: var(--gold); }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; margin: 24px 0; }
.card h2 { margin: 0 0 4px; font-size: 24px; }

/* ---------- the assistant ---------- */
.bothead { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.lamp { flex: none; width: 40px; height: 40px; color: var(--amber); filter: drop-shadow(0 0 8px #ff9a3c88); }
.log { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px 2px; scroll-behavior: smooth; }
.log:empty { display: none; }
.m { max-width: 88%; padding: 10px 14px; border-radius: 16px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; }
.m.me { align-self: flex-start; background: #4b3870; border-end-start-radius: 4px; }
.m.bot { align-self: flex-end; background: var(--card2); border: 1px solid #ffffff1a; border-end-end-radius: 4px; }
.m.note { align-self: center; max-width: 100%; font-size: 14px; color: var(--dim); background: none; padding: 2px 8px; text-align: center; }
.m.done { align-self: center; font-size: 14px; color: #12240f; background: var(--ok); border-radius: 99px; padding: 4px 14px; }
.m.err { align-self: center; font-size: 15px; color: var(--bad); background: none; text-align: center; }
.m a { color: var(--gold); }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chips button { font: inherit; font-size: 15px; color: var(--text); background: var(--soft); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; cursor: pointer; }
.chips button:hover { background: #ffffff24; color: var(--gold); }
.ask { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.ask textarea { flex: 1; min-height: 48px; max-height: 160px; resize: none; font: inherit; color: var(--text); background: var(--field); border: 1px solid #ffffff2a; border-radius: 14px; padding: 11px 14px; }
.ask textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px #ffb35c33; }
.ask .btn { flex: none; padding: 11px 18px; }
.btn:disabled { opacity: .55; cursor: default; }
.botfoot { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; color: var(--dim); min-height: 24px; }
.botfoot [data-r] { font-size: 18px; background: none; border: 1px solid transparent; border-radius: 8px; padding: 0 4px; cursor: pointer; }
.botfoot [data-r]:hover, .botfoot [data-r][aria-pressed=true] { border-color: var(--line); background: var(--soft); }

/* ---------- questions ---------- */
.faq { margin: 8px 0; }
.faq h2 { font-size: 22px; margin: 28px 0 10px; scroll-margin-top: 16px; }
.faq h2[hidden] { display: none; }
.faq details { background: var(--card); border: 1px solid #ffffff1a; border-radius: 14px; margin: 8px 0; }
.faq details[open] { border-color: var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 13px 18px; padding-inline-end: 44px; position: relative; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; inset-inline-end: 18px; top: 50%; width: 9px; height: 9px; border: solid var(--amber); border-width: 0 2px 2px 0;
  transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { margin: 0; padding: 0 18px 16px; color: #e9dfcc; }
.faq mark { background: #ffb35c55; color: inherit; border-radius: 3px; }
.none { text-align: center; color: var(--dim); }

/* ---------- the form ---------- */
#form label { display: block; font-size: 15px; font-weight: 700; margin: 12px 0 0; }
#form input:not([type=checkbox]), #form select, #form textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-weight: 400; color: var(--text);
  background: var(--field); border: 1px solid #ffffff2a; border-radius: 12px; padding: 10px 14px; }
#form select option { color: #000; background: #fff; }
#form input:focus, #form select:focus, #form textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px #ffb35c33; }
#form textarea { resize: vertical; min-height: 120px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#form .check { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 400; color: var(--dim); }
#form .check input { width: 18px; height: 18px; accent-color: var(--amber); }
.hp { position: absolute !important; inset-inline-start: -9999px; }
.ctx { white-space: pre-wrap; font-size: 13px; color: var(--dim); background: var(--field); border-radius: 10px; padding: 10px 12px; margin: 8px 0 0; max-height: 220px; overflow: auto; direction: rtl; }
.msg { min-height: 24px; margin: 10px 0 8px; font-size: 15px; }
.msg.err { color: var(--bad); }
#asMe { margin-top: 12px; }
.sent { text-align: center; padding: 8px 0; }
.sent h3 { font-family: 'Frank Ruhl Libre', serif; color: var(--ok); font-size: 22px; margin: 0 0 6px; }
.other { margin-top: 16px; border-top: 1px solid #ffffff14; padding-top: 12px; }

@media (max-width: 560px) {
  .row2 { grid-template-columns: 1fr; gap: 0; }
  .card { padding: 16px; }
  .m { max-width: 94%; }
  .ask .btn { padding: 11px 14px; }
}
