:root {
  color-scheme: light;
  --ink: #252432;
  --secondary: #565563;
  --accent: #604685;
  --line: #dcdbe3;
  --page: #f6f6f9;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
header { border-bottom: 1px solid var(--line); background: #fbfbfd; }
nav, main { width: min(100% - 36px, 720px); margin-inline: auto; }
nav, .actions, footer, .thread-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; }
nav { min-height: 64px; justify-content: space-between; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration: underline; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; font-weight: 700; letter-spacing: -.05em; color: var(--ink); text-decoration: none; }
main { padding-block: clamp(28px, 6vw, 62px) 36px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(31px, 5vw, 47px); line-height: 1.1; letter-spacing: -.045em; }
#intro { max-width: 56ch; margin-top: 12px; color: var(--secondary); }
h2 { font-size: clamp(21px, 3vw, 26px); line-height: 1.22; letter-spacing: -.025em; }
.panel { margin-top: 24px; padding: clamp(18px, 4vw, 32px); border: 1px solid var(--line); border-radius: 19px; background: white; box-shadow: 0 6px 22px #24223408; }
form { display: grid; gap: 16px; margin-top: 20px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
input, textarea, select, button { color: inherit; font: inherit; }
input, textarea, select { width: 100%; min-width: 0; padding: 9px 11px; min-height: 44px; border: 1px solid #b9b8c5; border-radius: 8px; background: #fff; font-size: 16px; font-weight: 400; }
textarea { resize: vertical; }
input[type=file] { padding: 8px; font-size: 14px; }
button { min-height: 44px; padding: 8px 14px; border: 1px solid #c8c7d0; border-radius: 9px; background: #f7f7fa; font-size: 15px; font-weight: 600; cursor: pointer; }
button:hover:enabled { background: #eae9ef; }
button:disabled { opacity: .6; cursor: progress; }
button.primary { justify-self: start; background: var(--accent); color: white; border-color: var(--accent); }
button.primary:hover:enabled { background: #513b70; }
:focus-visible { outline: 3px solid #8056ae; outline-offset: 3px; }
.skip { position: absolute; top: 8px; left: 12px; transform: translateY(-150%); padding: 8px; background: white; z-index: 1; }
.skip:focus { transform: none; }
.hint, footer { color: var(--secondary); font-size: 14px; }
form .hint { margin-top: -10px; }
.order-note { margin-top: 14px; padding: 8px 12px; border-radius: 8px; background: #f2eff7; color: #4f4164; overflow-wrap: anywhere; }
.thread-heading { justify-content: space-between; }
.thread-heading + p { margin-top: 9px; }
.badge { background: #f0edf5; color: #514263; padding: 3px 10px; border-radius: 16px; font-size: 13px; font-weight: 600; }
.actions, #manual-copy, #older { margin-top: 16px; }
#messages { display: grid; gap: 12px; list-style: none; margin: 22px 0; padding: 0; }
#messages li { padding: 12px 15px; background: #f5f5f8; border-left: 3px solid #bbb9c7; border-radius: 4px 10px 10px 4px; }
#messages li.operator { border-left-color: #8b75a9; background: #f5f0f9; }
.message-meta { display: flex; gap: 4px 12px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; font-size: 14px; }
.message-meta time { color: var(--secondary); font-size: 12px; }
#messages p { margin-top: 5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.new-ticket { display: inline-block; margin-top: 18px; font-size: 14px; }
.feedback:not(:empty) { margin: 16px 0 0; padding: 12px 14px; color: #434053; background: #eeedf3; border-radius: 9px; }
.feedback.error:not(:empty) { color: #7b2c35; background: #fbeced; }
footer { margin-top: 22px; }
@media (max-width: 570px) { .fields { grid-template-columns: 1fr; } }
