/* Skyburst Support: the client portal. The Skyburst look, dark by default with an ivory light theme, calm and built for a
   phone first. No inline styles are used anywhere (the page's security rules do not allow them). */
@font-face { font-family: 'Sora'; src: url('/support/fonts/Sora-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('/support/fonts/Sora-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/support/fonts/InstrumentSans-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/support/fonts/InstrumentSans-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Instrument Sans'; src: url('/support/fonts/InstrumentSans-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root, html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #04050A; --bg-2: #090B11; --surface: #0E1118; --surface-2: #141826;
  --ink: #EEF0FA; --ink-2: #C9CDE0; --muted: #8E94AE; --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .18);
  --energy: #6C7BFF; --energy-2: #FF5FD2; --link: #A9B2FF; --ok: #3DD68C; --warn: #FFB547; --bad: #FF6B7A;
  --mine: rgba(108, 123, 255, .2); --glow-a: rgba(108, 123, 255, .22); --glow-b: rgba(255, 95, 210, .12); --btn-ink: #fff;
}
html[data-theme="light"] {
  color-scheme: light;
  --bg: #F8F4EC; --bg-2: #F1EADF; --surface: #FFFDF9; --surface-2: #F4EEE3;
  --ink: #1F1B2E; --ink-2: #37314D; --muted: #5F5970; --line: rgba(52, 40, 92, .12); --line-2: rgba(52, 40, 92, .26);
  --energy: #5546E8; --energy-2: #D24BAA; --link: #4A3AD6; --ok: #17694A; --warn: #8A5A00; --bad: #B3261E;
  --mine: rgba(85, 70, 232, .1); --glow-a: rgba(106, 91, 242, .12); --glow-b: rgba(210, 75, 170, .07); --btn-ink: #fff;
}
:root { --display: 'Sora', system-ui, sans-serif; --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --radius: 16px; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; color: var(--ink); font: 16px/1.55 var(--body);
  background: radial-gradient(900px 420px at 85% -120px, var(--glow-a), transparent 70%), radial-gradient(700px 360px at -10% -80px, var(--glow-b), transparent 70%), var(--bg);
  background-attachment: fixed; display: flex; flex-direction: column;
}
a { color: var(--link); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; line-height: 1.15; margin: 0; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.1rem; margin-bottom: 10px; } h3 { font-size: 1rem; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .pad { padding: 16px; }
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 600; }
.brand img { border-radius: 8px; } .brand b { background: linear-gradient(90deg, var(--energy), var(--energy-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tools { display: flex; gap: 8px; }
.themebtn, .signout { font: 500 .82rem var(--body); color: var(--ink-2); background: transparent; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.themebtn:hover, .signout:hover { border-color: var(--energy); }
main { width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 16px 32px; flex: 1; }
.foot { text-align: center; color: var(--muted); font-size: .78rem; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }

.card { background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
html[data-theme="light"] .card { box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(70, 50, 20, .04), 0 16px 34px -26px rgba(58, 44, 120, .34); }
.card.link { display: block; color: inherit; text-decoration: none; }
.card.link:hover, .card.link:focus-visible { border-color: var(--line-2); }
.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.head { margin: 4px 0 16px; } .head p { margin: 4px 0 0; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 600; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip.open { border-color: rgba(108, 123, 255, .6); color: var(--link); } .chip.done { border-color: rgba(61, 214, 140, .6); color: var(--ok); }

label { display: block; font-size: .85rem; font-weight: 500; color: var(--ink-2); margin: 12px 0 6px; }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 11px 12px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--energy); outline-offset: 2px; border-color: transparent; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--ink-2); margin: 12px 0; }
.check input { width: 20px; height: 20px; flex: none; margin: 2px 0 0; accent-color: var(--energy); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: 600 .95rem var(--body); cursor: pointer; text-decoration: none; }
.btn.primary { border: 0; background: linear-gradient(135deg, var(--energy), #8B5CFF 60%, var(--energy-2)); color: var(--btn-ink); box-shadow: 0 6px 24px color-mix(in srgb, var(--energy) 35%, transparent); }
.btn.ghost { background: transparent; } .btn[disabled] { opacity: .55; cursor: wait; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.login { max-width: 420px; margin: 7vh auto 0; }
.err { color: var(--bad); font-size: .9rem; margin-top: 8px; } .ok { color: var(--ok); }

/* The chat window */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow-y: auto; padding: 4px 2px 8px; }
.bubble { max-width: 88%; padding: 10px 13px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; font-size: .95rem; }
.bubble.mine { align-self: flex-end; background: var(--mine); border-color: color-mix(in srgb, var(--energy) 35%, transparent); }
.bubble.fixed { align-self: flex-start; color: var(--ink-2); font-style: normal; }
.bubble .who { display: block; font-size: .72rem; color: var(--muted); margin-bottom: 2px; font-weight: 600; }
.bubble.typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; width: max-content; }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--energy-2); animation: typing-dot 1s ease-in-out infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; } .bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .bubble.typing i { animation: none; opacity: .7; } }
.preview { margin-top: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--energy-2) 45%, transparent); background: color-mix(in srgb, var(--energy-2) 8%, transparent); }
.preview p { margin: 0; } .preview textarea { min-height: 64px; margin-top: 4px; }
.composer { margin-top: 10px; } .composer textarea { min-height: 72px; }
.composer .btns { margin-top: 8px; justify-content: space-between; align-items: center; }
.hint { font-size: .8rem; color: var(--muted); }

ul.points { margin: 8px 0 0; padding-left: 20px; } ul.points li { margin: 3px 0; }
.meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 6px 0 4px; } .meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--energy), var(--energy-2)); }
.meter.w0 i { width: 0; } .meter.w10 i { width: 10%; } .meter.w20 i { width: 20%; } .meter.w30 i { width: 30%; } .meter.w40 i { width: 40%; } .meter.w50 i { width: 50%; }
.meter.w60 i { width: 60%; } .meter.w70 i { width: 70%; } .meter.w80 i { width: 80%; } .meter.w90 i { width: 90%; } .meter.w100 i { width: 100%; }
.empty { text-align: center; padding: 22px 12px; color: var(--muted); }
.back { display: inline-block; margin-bottom: 10px; font-size: .9rem; text-decoration: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.ts { margin: 12px 0; min-height: 65px; }
