:root {
  color-scheme: light; color: #242248; background: #f9f9ff;
  font: 15px/1.48 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink:#242248; --muted:#514a6d; --accent:#4b2dc2; --line:#e4e1f4;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #3263d8; outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .63; }
img { max-width: 100%; }
a { color: #4828b5; font-weight: 650; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: 1.77rem; line-height: 1.08; letter-spacing: -.042em; }
h2 { font-size: 1.35rem; letter-spacing: -.025em; }
small,.small { font-size: .82rem; }
.masthead {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; min-height: 65px;
  padding: calc(.62rem + env(safe-area-inset-top)) 1rem .62rem;
  background: linear-gradient(110deg,#16123e,#24216b 62%,#38309a); color: #fff;
}
.brand { width: 48px; height: 34px; object-fit: contain; }
.masthead strong,.masthead small { display: block; }
.masthead small { color: #dedcff; }
.minimize { background: #ffffff19; border: 1px solid #ffffff3d; color: white; border-radius: 50%; font-size: 1.55rem; width: 2.5rem; height: 2.5rem; line-height: 1; }
#view { overflow: auto; overscroll-behavior: contain; padding: 1.05rem; outline: none; }
#tabs { display: flex; padding: .3rem .6rem max(.3rem, env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
#tabs button { flex: 1; padding: .4rem .1rem; border: 0; border-radius: 12px; color: #514a6d; background: transparent; font-size: .76rem; font-weight: 675; }
#tabs button svg { display: block; margin: 0 auto .13rem; }
#tabs button[aria-current] { color: #4926bb; background: #efebff; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; min-height: 151px; padding: 1.1rem 108px 1.05rem 1rem;
  background: radial-gradient(ellipse at 87% 35%,#585bf0 0%,transparent 53%),linear-gradient(130deg,#232176,#4726b0);
  color: #fff; border-radius: 19px; box-shadow: 0 5px 14px #2e237d3b;
}
.hero img { position: absolute; right: 3px; bottom: 8px; width: 111px; z-index: -1; filter: drop-shadow(0 5px 7px #160c6875); }
.hero p { margin-top: .55rem; font-size: .84rem; color: #f0edff; }
.search { display: flex; align-items: center; margin: .95rem 0; gap: .4rem; border: 1px solid #ded8f1; border-radius: 13px; padding: .28rem .4rem .28rem .68rem; background: white; }
.search input { width: 100%; padding: .55rem 0; color: var(--ink); background: transparent; border: 0; min-width: 0; }
.search button { min-width: 36px; border: 0; background: transparent; color: var(--accent); display: grid; place-items: center; padding: .4rem; }
.lead { color: var(--muted); font-size: .88rem; margin: .36rem 0 .65rem; }
.topic-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; margin: .55rem 0 .85rem; }
.topic {
  color: var(--ink); background: #fff; border: 1px solid var(--line); padding: .48rem .45rem; min-height: 48px;
  border-radius: 11px; text-align: left; font-size: .78rem; font-weight: 680; display: flex; align-items: center; gap: .42rem;
}
.topic svg { color: var(--accent); flex: 0 0 auto; }
.topic:hover,.result:hover { background: #f0edff; border-color: #c4b8f4; }
.primary,.secondary,.inline { border: 0; font-weight: 710; text-align: center; text-decoration: none; }
.primary,.secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 12px;
  min-height: 42px; padding: .55rem .85rem;
}
.primary { background: linear-gradient(115deg,#5430c7,#3633b6); color: #fff; }
.primary:hover { background: #392097; }
.secondary { background: #ede8fd; color: #4926a8; }
.inline { color: #4b2dc2; background: transparent; min-height: 36px; padding: .15rem 0; }
.full { width: 100%; }
.links { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .65rem; font-size: .8rem; }
.card { background: white; border: 1px solid var(--line); border-radius: 15px; padding: .9rem; margin-top: .65rem; }
.result { width: 100%; display: block; padding: .64rem .73rem; border: 1px solid var(--line); text-align: left; border-radius: 11px; background: #fff; color: var(--ink); margin-top: .45rem; }
.result > strong,.result > small { display: block; overflow-wrap: anywhere; }
.result small { color: var(--muted); margin-top: .1rem; }
.guide { display: flex; align-items: flex-start; gap: .5rem; margin: .7rem 0; }
.guide img { width: 36px; flex: 0 0 36px; }
.guide div { border-radius: 5px 15px 15px 15px; background: #eeeafa; padding: .6rem .72rem; color: #2a2057; }
.guide small { display: block; color: #56507a; margin-bottom: .12rem; }
.form-box { display: grid; gap: .55rem; margin-top: .65rem; }
.form-box label { font-size: .83rem; font-weight: 680; }
.form-box textarea,.rating-comment { width: 100%; min-height: 76px; resize: vertical; font-size: 16px; border: 1px solid #cec4e7; border-radius: 12px; padding: .6rem .65rem; color: var(--ink); background: #fff; }
.form-box p { color: var(--muted); }
.form-box input[type=file] { max-width: 100%; font-size: .76rem; }
.preview { width: min(140px,100%); max-height: 105px; object-fit: contain; border-radius: .45rem; background: #e7e2f5; }
.honeypot { position: absolute; inset-inline-start: -10000px; }
#view.chat-view { display: grid; grid-template-rows: auto minmax(0,1fr) auto; padding: 0; }
.thread-head { padding: .45rem .95rem .6rem; border-bottom: 1px solid var(--line); background: #fff; }
.thread-head h2 { overflow-wrap: anywhere; }
.thread-head .inline { min-height: 30px; }
.thread-head small { color: var(--muted); }
.transcript { overflow: auto; padding: .75rem .85rem; overscroll-behavior: contain; }
.message { background: #eae6f8; padding: .6rem .72rem; border-radius: 5px 14px 14px 14px; max-width: 89%; margin: .44rem auto .44rem 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.customer { color: white; background: #4732b4; border-radius: 14px 5px 14px 14px; margin-inline: auto 0; }
.message small { display: block; opacity: .88; margin-top: .2rem; }
.message a { display: block; font-size: .8rem; }
.message.customer a { color: #fff; }
.chat-compose { max-height: 46vh; overflow-y: auto; border-top: 1px solid var(--line); margin: 0; padding: .5rem .85rem; background: #fff; }
.chat-compose textarea { min-height: 59px; }
.stars { display: flex; justify-content: space-between; gap: .3rem; padding: .5rem 0; }
.stars button { flex: 1; padding: .36rem .1rem; color: #593907; background: #fff4d9; border: 1px solid #ecd693; border-radius: 9px; }
.stars button[aria-pressed=true] { background: #ffe198; border-color: #94640b; }
.error { color: #9c2149 !important; }
.badge { display: inline-block; border-radius: 20px; padding: 0 .42rem; background: #542dc3; color: white; font-weight: 700; min-width: 18px; text-align: center; font-size: .75rem; }
.article { overflow-wrap: anywhere; }
.article :is(p,li,h2,h3,h4) { margin: .6rem 0; }
.article img { height: auto; border-radius: .5rem; }
@media (max-width: 360px) {
  .hero { padding-inline-end: 88px; }
  .hero img { width: 93px; }
  #view { padding: .8rem; }
}
.message > img,.card > img { display: block; width: 30px; margin-bottom: .35rem; }
.recovery { margin: .2rem 0 .45rem; }
.recovery :is(p,label,button) { margin-top: .32rem; }
.recovery input[type=email] { width: 100%; display: block; margin-top: .3rem; padding: .5rem; border: 1px solid #cec4e7; border-radius: .55rem; font-size: 16px; }
