/* The support pages share the dark glass look of the main site. */
:root {
  color-scheme: dark;
  --bg: #090a10; --text: #f4f5f9; --muted: #b4b9c8; --faint: #8b91a3; --accent: #c9bcff; --ink: #14111f;
  --card: rgb(255 255 255 / .055); --edge: rgb(255 255 255 / .11); --spec: rgb(255 255 255 / .18); --field: rgb(0 0 0 / .28);
  --motion-out: cubic-bezier(.23, 1, .32, 1);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
[hidden] { display: none !important; }
.glow { position: fixed; inset: -20vmax; z-index: -1; filter: blur(90px) saturate(1.2); opacity: .42; pointer-events: none; }
.glow i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; }
.glow i:nth-child(1) { left: 8%; top: 4%; background: radial-gradient(circle, #5b6cff, transparent 65%); }
.glow i:nth-child(2) { right: 4%; top: 0; background: radial-gradient(circle, #ff7ab8, transparent 65%); }
.glow i:nth-child(3) { left: 38%; bottom: 0; background: radial-gradient(circle, #1fd1c0, transparent 65%); }
a { color: var(--text); text-underline-offset: .2em; }
.skip { position: absolute; top: 8px; left: 12px; z-index: 3; padding: 8px 12px; border-radius: 8px; background: var(--text); color: var(--ink); transform: translateY(-160%); }
.skip:focus { transform: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

header { position: sticky; top: 12px; z-index: 2; padding-inline: 14px; }
nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(100%, 1040px); min-height: 60px; margin: 12px auto 0; padding: 8px 10px 8px 20px; border-radius: 999px; background: rgb(22 24 36 / .6); backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 .5px var(--edge), 0 20px 60px rgb(0 0 0 / .35); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 18px; font-weight: 700; letter-spacing: -.03em; text-decoration: none; }
#language { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 16px; border-radius: 999px; background: rgb(255 255 255 / .09); font-size: 14px; font-weight: 600; text-decoration: none; }

main { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 0 clamp(28px, 5vw, 72px); width: min(100% - 32px, 1040px); margin-inline: auto; padding-block: clamp(36px, 6vw, 84px) 48px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(36px, 5.4vw, 58px); line-height: 1.06; letter-spacing: -.05em; text-wrap: balance; }
#intro { max-width: 44ch; margin-top: 18px; color: var(--muted); font-size: 18px; }
h2 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.2; letter-spacing: -.03em; }
.panel { margin-top: 28px; padding: clamp(20px, 3.4vw, 36px); border-radius: 28px; background: linear-gradient(165deg, rgb(255 255 255 / .075), rgb(255 255 255 / .03)); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 .5px var(--edge), 0 30px 80px rgb(0 0 0 / .4); }
footer { display: grid; gap: 8px; margin-top: 28px; }
footer a { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding: 10px 18px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 .5px var(--edge); font-size: 14.5px; font-weight: 600; text-decoration: none; transition: background-color .2s, translate .3s var(--motion-out); }
footer a::after { content: '→'; color: var(--accent); }
@media (hover: hover) { footer a:hover { background: rgb(255 255 255 / .1); translate: 4px 0; } }

form { display: grid; gap: 20px; margin-top: 24px; }
label, legend, .upload-title { font-size: 14.5px; font-weight: 600; }
label { display: grid; gap: 8px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; padding: 0; }
.topics > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic { position: relative; display: grid; cursor: pointer; }
.topic input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.topic span { pointer-events: none; display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 10px 14px; border-radius: 16px; background: var(--field); box-shadow: inset 0 0 0 1px var(--edge); line-height: 1.3; transition: background-color .2s, box-shadow .2s, translate .25s var(--motion-out); }
.topic svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .topic:hover span { translate: 0 -2px; box-shadow: inset 0 0 0 1px rgb(201 188 255 / .45); } }
.topic input:checked + span { background: #332949; box-shadow: inset 0 0 0 1.5px #9485c5; }
.topic input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

input, select, textarea, button { color: inherit; font: inherit; }
input:not([type=file]):not([type=radio]), select, textarea { width: 100%; min-width: 0; min-height: 52px; padding: 13px 16px; border: 0; border-radius: 16px; background: var(--field); box-shadow: inset 0 0 0 1px var(--edge); font-size: 16px; font-weight: 400; transition: box-shadow .2s, background-color .2s; }
input:not([type=file]):not([type=radio]):focus, select:focus, textarea:focus { outline: none; background: rgb(0 0 0 / .4); box-shadow: inset 0 0 0 1.5px #a998e8, 0 0 0 4px rgb(157 136 255 / .18); }
textarea { min-height: 140px; resize: vertical; field-sizing: content; max-height: 420px; }
textarea:user-invalid, input:user-invalid, select:user-invalid { box-shadow: inset 0 0 0 1.5px #e58a94; }
.hint { color: var(--muted); font-size: 13.5px; font-weight: 400; }
form .hint { margin-top: -10px; }
.with-counter { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.with-counter output { flex: none; color: var(--faint); font-variant-numeric: tabular-nums; }

.upload { display: grid; gap: 10px; }
.dropzone { position: relative; display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1.5px dashed rgb(201 188 255 / .35); border-radius: 18px; background: var(--field); cursor: pointer; font-weight: 400; transition: border-color .2s, background-color .2s, scale .2s var(--motion-out); }
.dropzone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgb(201 188 255 / .08); }
.dropzone.over { scale: 1.015; }
.dropzone.filled { border-style: solid; }
.dropzone svg { flex: none; width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dropzone img { flex: none; width: 64px; height: 48px; border-radius: 9px; object-fit: cover; }
.dropzone img:not([hidden]) + svg { display: none; }
.drop-text { display: grid; gap: 2px; min-width: 0; color: var(--muted); font-size: 13.5px; }
.drop-text strong { color: var(--text); font-size: 15px; overflow-wrap: anywhere; }

button { min-height: 44px; padding: 9px 18px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .09); box-shadow: inset 0 1px 0 var(--spec), inset 0 0 0 .5px var(--edge); font-size: 14.5px; font-weight: 650; cursor: pointer; transition: filter .2s, translate .25s var(--motion-out), scale .15s; }
@media (hover: hover) { button:hover:enabled { filter: brightness(1.15); translate: 0 -1px; } }
button:active:enabled { scale: .97; }
button:disabled { opacity: .55; cursor: progress; }
.upload button, #unlink-order, #older, #attachment { justify-self: start; }
button.primary { width: 100%; min-height: 54px; background: linear-gradient(180deg, #efeafd, #d5cbfa); color: var(--ink); font-size: 16px; box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 14px 38px rgb(157 136 255 / .3); }
button[aria-busy=true]::after { content: ''; display: inline-block; width: 15px; height: 15px; margin-left: 10px; vertical-align: -2px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.order-note { margin-top: 16px; padding: 11px 16px; border-radius: 14px; background: rgb(201 188 255 / .12); box-shadow: inset 0 0 0 1px rgb(201 188 255 / .3); overflow-wrap: anywhere; }
#unlink-order { margin-top: 10px; }
.thread-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.thread-heading + p { margin-top: 10px; }
.badge { padding: 4px 12px; border-radius: 999px; background: rgb(118 210 154 / .14); color: #9fe3ba; font-size: 13px; font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions, #manual-copy, #older, #attachment { margin-top: 16px; }
#messages { display: grid; gap: 12px; margin: 24px 0; padding: 0; list-style: none; }
#messages li { justify-self: end; max-width: min(100%, 52ch); padding: 12px 16px; border-radius: 18px 18px 6px 18px; background: #332949; box-shadow: inset 0 0 0 1px rgb(148 133 197 / .55); }
#messages li.operator { justify-self: start; border-radius: 18px 18px 18px 6px; background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 .5px var(--edge); }
.message-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; font-size: 13.5px; }
.message-meta time { color: var(--faint); font-size: 12px; }
#messages p { margin-top: 5px; overflow-wrap: anywhere; white-space: pre-wrap; }
#closed { margin-top: 12px; }
.new-ticket { display: inline-block; margin-top: 20px; color: var(--accent); font-size: 14.5px; font-weight: 600; }
.feedback:not(:empty) { margin-top: 16px; padding: 13px 18px; border-radius: 16px; background: rgb(118 210 154 / .12); box-shadow: inset 0 0 0 1px rgb(118 210 154 / .35); }
.feedback.error:not(:empty) { background: rgb(229 138 148 / .13); box-shadow: inset 0 0 0 1px rgb(229 138 148 / .45); color: #ffd3d8; }

/* Wide screens: the explanation and links stay beside the form. */
@media (min-width: 900px) {
  main { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: auto auto auto 1fr; }
  main > h1, main > #intro, main > footer, main > noscript { grid-column: 1; }
  main > h1 { grid-row: 1; }
  main > #intro { grid-row: 2; }
  main > footer { grid-row: 3; align-self: start; }
  main > .panel, main > .feedback { grid-column: 2; }
  main > .panel { grid-row: 1 / span 4; margin-top: 0; align-self: start; }
  main > .feedback { grid-row: 5; }
}
@media (max-width: 570px) { .fields { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .topics > div { grid-template-columns: minmax(0, 1fr); } .with-counter { flex-direction: column; gap: 4px; } }
@media (prefers-reduced-motion: no-preference) {
  main > h1, main > #intro, main > footer { animation: rise .5s var(--motion-out) backwards; }
  main > #intro { animation-delay: .08s; }
  main > footer { animation-delay: .16s; }
  .panel { animation: rise .6s .1s var(--motion-out) backwards; }
  .topics .topic { animation: rise .45s var(--motion-out) backwards; }
  .topic:nth-child(2) { animation-delay: .26s; } .topic:nth-child(1) { animation-delay: .2s; } .topic:nth-child(3) { animation-delay: .32s; } .topic:nth-child(4) { animation-delay: .38s; }
  .topic input:checked + span svg { animation: pop .35s var(--motion-out); }
  #messages li, .feedback:not(:empty) { animation: rise .4s var(--motion-out) backwards; }
}
@keyframes pop { 40% { scale: 1.3; } }
@keyframes rise { from { opacity: 0; translate: 0 14px; filter: blur(5px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
