/* Sol, the helper character: a floating launcher and a small chat panel */
.sol { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 60; display: grid; justify-items: end; gap: .6rem; }
.sol-launcher { position: relative; display: grid; place-items: center; width: 4.4rem; height: 4.4rem; padding: 0; border: 0; border-radius: 50%; background: var(--surface); box-shadow: 0 6px 22px rgba(11, 31, 58, .28); cursor: pointer; animation: sol-bob 3.6s ease-in-out infinite; }
.sol-launcher:hover, .sol-launcher:focus-visible { transform: scale(1.08) rotate(-4deg); animation-play-state: paused; outline: 3px solid var(--accent, #20a36b); outline-offset: 3px; }
.sol-face { display: block; }
.sol-face-lg { width: 3.7rem; height: 3.7rem; }
.sol-face-sm { width: 2.4rem; height: 2.4rem; }
.sol-face-xl { width: 7rem; height: 7rem; }
.sol-rays { transform-origin: 32px 32px; animation: sol-spin 24s linear infinite; }
.sol-eyes { transform-origin: 32px 30px; animation: sol-blink 5s infinite; }
.sol-hello { position: absolute; right: 100%; top: 50%; translate: -.5rem -50%; padding: .35rem .75rem; border-radius: 999px; background: var(--surface); color: var(--text-strong); font-size: .85rem; box-shadow: 0 3px 12px rgba(11, 31, 58, .2); white-space: nowrap; transition: opacity .3s; }
.sol-hello[hidden], .sol.is-open .sol-hello { opacity: 0; pointer-events: none; }
.sol-panel { width: min(22rem, calc(100vw - 2rem)); max-height: min(34rem, calc(100vh - 7rem)); display: grid; grid-template-rows: auto minmax(6rem, 1fr) auto auto auto; background: var(--surface); border: 1px solid var(--border); border-radius: 1.1rem; box-shadow: 0 14px 44px rgba(11, 31, 58, .3); overflow: hidden; }
.sol-panel[hidden] { display: none; }
.sol-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: linear-gradient(135deg, #fff3cc, #d8f3e6); color: #1c2733; }
.sol-head strong { display: block; } .sol-sub { font-size: .8rem; opacity: .75; }
.sol-x { margin-left: auto; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; cursor: pointer; color: inherit; padding: 0 .4rem; }
.sol-log { padding: .8rem .9rem; overflow-y: auto; display: grid; gap: .55rem; align-content: start; }
.sol-msg { margin: 0; padding: .55rem .75rem; border-radius: .9rem; max-width: 92%; line-height: 1.45; font-size: .93rem; }
.sol-bot { background: var(--surface-2); border-bottom-left-radius: .25rem; }
.sol-me { background: var(--accent, #20a36b); color: #fff; justify-self: end; border-bottom-right-radius: .25rem; }
.sol-msg strong { display: block; margin-bottom: .15rem; }
.sol-action { justify-self: start; }
.sol-chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .9rem .6rem; } .sol-chips[hidden] { display: none; }
.sol-chip { border: 1px solid var(--border-strong, var(--border)); background: var(--surface); color: var(--text); border-radius: 999px; padding: .25rem .7rem; font-size: .8rem; cursor: pointer; }
.sol-chip:hover, .sol-chip:focus-visible { border-color: var(--accent, #20a36b); }
.sol-form { display: flex; gap: .4rem; padding: .6rem .9rem; border-top: 1px solid var(--border); }
.sol-form input { flex: 1; min-width: 0; padding: .5rem .7rem; border: 1px solid var(--border-strong, var(--border)); border-radius: .7rem; background: var(--surface); color: var(--text); font: inherit; }
.sol-send { padding: .45rem .9rem; border: 0; border-radius: .7rem; background: var(--accent, #20a36b); color: #fff; font-weight: 600; cursor: pointer; }
.sol-note { margin: 0; padding: 0 .9rem .7rem; font-size: .74rem; color: var(--text-muted); }
.sol-nojs { padding: .5rem 1rem; border-radius: 999px; background: var(--surface); box-shadow: 0 3px 12px rgba(11, 31, 58, .2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@keyframes sol-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes sol-spin { to { transform: rotate(360deg); } }
@keyframes sol-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@media (prefers-reduced-motion: reduce) { .sol-launcher, .sol-rays, .sol-eyes { animation: none; } .sol-launcher:hover { transform: none; } }
@media (max-width: 520px) { .sol-hello { display: none; } }

/* Help page */
.help-hero { display: flex; gap: var(--s5); align-items: center; flex-wrap: wrap; }
.help-hero .sol-face-xl { flex: none; filter: drop-shadow(0 4px 10px rgba(232, 169, 31, .35)); }
.help-jump { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.faq-group { margin-top: var(--s6); } .faq-group h2 { margin-bottom: var(--s3); }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--s2); }
.faq-item summary { cursor: pointer; padding: var(--s3) var(--s4); font-weight: 600; color: var(--text-strong); }
.faq-item p { margin: 0; padding: 0 var(--s4) var(--s4); line-height: 1.6; }
.word-filter { width: 100%; max-width: 24rem; padding: .6rem .8rem; border: 1px solid var(--border-strong, var(--border)); border-radius: .7rem; background: var(--surface); color: var(--text); font: inherit; margin-bottom: var(--s4); }
.word-groups { display: grid; gap: var(--s6); }
.word-group h3 { margin: 0; } .word-group > p { margin: var(--s1) 0 var(--s3); color: var(--text-muted); }
.word-cards { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.word-card { padding: var(--s4); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid #f2b632; border-radius: var(--radius); line-height: 1.55; }
.word-card h4 { margin: 0 0 var(--s1); } .word-card p { margin: 0; }
.word-card[hidden], .word-group[hidden] { display: none; }


/* Sol v2: AI answers, figures, consent */
.sol-head .sol-clear { margin-left: auto; margin-right: var(--s2); background: none; border: 0; color: var(--text-muted); font-size: var(--t-xs); cursor: pointer; text-decoration: underline; min-height: 44px; }
.sol-text { margin: 0 0 var(--s2); }
.sol-q { display: block; margin-bottom: var(--s1); }
.sol-next { margin: var(--s2) 0 0; color: var(--text-muted); font-size: var(--t-sm); }
.sol-figs { margin-top: var(--s2); font-size: var(--t-sm); }
.sol-figs summary { cursor: pointer; color: var(--accent); min-height: 44px; display: flex; align-items: center; }
.sol-figlist { margin: var(--s1) 0 0; padding-left: var(--s4); }
.sol-how { display: block; color: var(--text-muted); overflow-wrap: anywhere; }
.sol-consent { margin: 0 var(--s3) var(--s3); padding: var(--s3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--t-sm); }
.sol-consent p { margin: 0 0 var(--s2); }

.sol-panel { grid-template-rows: auto minmax(4rem, 1fr) auto auto auto auto; }
.sol-msg { overflow-wrap: anywhere; }
.sol-chip, .sol-send, .sol-x, .sol-clear { min-height: 44px; }
.sol-figlist { padding-left: 1rem; }
.sol-send:disabled, .sol-clear:disabled { opacity: .6; cursor: wait; }
.sol-consent { padding: .7rem; border-radius: .7rem; }
@media (max-width: 520px) { .sol-panel { max-height: calc(100dvh - 7rem); } .site-footer, .pub-footer { padding-bottom: 6rem; } }
/* On a phone, a check page, report or six-areas page is long and full of controls: Sol sits at the end of the page instead of floating over its controls */
@media (max-width: 640px) { body:has(.check-page) .sol, body:has(.fin-page) .sol { position: static; justify-items: center; margin: var(--s5, 1.5rem) auto var(--s4, 1rem); } }

/* 2026-10-18: unobtrusive helper: no unsolicited greeting, no bobbing, small, and it can be minimised to a tab */
.sol-hello { display: none !important; }
.sol-launcher { width: 3rem; height: 3rem; animation: none; box-shadow: 0 2px 10px rgba(20, 36, 61, .18); }
.sol-launcher .sol-face-lg { width: 2.5rem; height: 2.5rem; }
.sol-launcher:hover, .sol-launcher:focus-visible { transform: none; }
.sol-min { position: absolute; left: -10px; top: -6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border, #E2E8F0);
  background: var(--surface, #fff); color: var(--text-muted, #526078); font-size: 14px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.sol-min::after { content: ""; position: absolute; inset: -11px; }   /* a 44px touch area around the small dot */
.sol-restore { display: none; padding: 6px 12px; min-height: 36px; border-radius: 8px; border: 1px solid var(--border, #E2E8F0);
  background: var(--surface, #fff); color: var(--text, #14243D); font: inherit; font-size: 13px; cursor: pointer; }
.sol.is-min .sol-launcher, .sol.is-min .sol-min { display: none; }
.sol.is-min .sol-restore { display: inline-flex; align-items: center; }
.sol-section { margin: var(--s1) 0; } .sol-section-title { font-weight: 600; margin: 0; }
