:root {
  font: 16px/1.6 system-ui,sans-serif; color-scheme: dark; color: #f2f6f9; background: #0b1520;
  --line: #314a60; --panel: #142537; --muted: #b6c7d6; --accent: #ff9b54;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: #c0def3; text-underline-offset: .22em; }
a:hover { color: #ffd0af; }
button,input,textarea,select { font: inherit; }
:focus-visible { outline: 3px solid #ffbd8c; outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -10rem; }
.skip:focus { top: .4rem; z-index: 3; background: var(--panel); padding: .6rem; }
.mast, footer {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  background: #10202e; border-bottom: 1px solid var(--line);
  padding: .8rem max(4vw,calc((100vw - 72rem)/2));
}
.brand, nav,.actions { display:flex; align-items:center; flex-wrap:wrap; gap:.75rem; }
.brand { text-decoration:none; color:inherit; }
.brand img { border-radius:.35rem; }
main { width:min(72rem,92vw); margin:2.35rem auto 4rem; }
.lead { padding:clamp(1.25rem,5vw,3.4rem); border:1px solid #46637a; border-radius:.85rem;
  background:radial-gradient(ellipse at 78% 14%,#28485f,transparent 64%),#112538; }
h1,h2,h3 { line-height:1.15; letter-spacing:-.035em; margin:0; text-wrap:balance; }
h1 { font-size:clamp(2.55rem,6vw,4.75rem); }
h2 { font-size:clamp(1.55rem,3vw,2.2rem); }
p { margin:.55rem 0; }
.lead p,.muted,#ticket-status { color:var(--muted); }
.lead .actions { margin-top:1.15rem; }
section { scroll-margin:1rem; margin-top:2rem; }
.section-head { display:flex; align-items:center; flex-wrap:wrap; justify-content:space-between; gap:.65rem; margin-bottom:.8rem; }
button,.primary { min-height:42px; padding:.42rem .75rem; border-radius:.4rem; display:inline-flex; align-items:center;
  background:#20394f; color:#eff7fc; border:1px solid #58778e; text-decoration:none; cursor:pointer; }
.primary { background:var(--accent); color:#1c1109; border-color:var(--accent); font-weight:700; }
.primary:hover { background:#ffb77f; color:#1c1109; }
button:disabled { cursor:wait; opacity:.65; }
.guide-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(14rem,100%),1fr)); gap:.65rem; }
.guide-grid a,.panel { padding:1rem; background:var(--panel); border:1px solid var(--line); border-radius:.55rem; }
.guide-grid a { display:grid; gap:.15rem; text-decoration:none; }
.guide-grid a:hover { border-color:#bd906b; }
.guide-grid a span { color:var(--muted); font-size:.92rem; }
.panel { margin:.85rem 0; }
.pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
label { display:grid; gap:.3rem; margin:.65rem 0; }
input,select,textarea { width:100%; min-width:0; color:inherit; border-radius:.35rem; border:1px solid #55738b; padding:.5rem .65rem; background:#101e2b; }
textarea { resize:vertical; }
#action-error { color:#ffcdb2; background:#33251f; border-left:3px solid var(--accent); padding:.6rem .8rem; }
.ticket-rows { margin:.9rem 0; padding:0; list-style:none; }
.ticket-rows li { border-bottom:1px solid var(--line); }
.ticket-rows button { display:flex; justify-content:space-between; flex-wrap:wrap; text-align:left; gap:.6rem; width:100%; border:0; background:#142637; padding:.75rem; }
.ticket-rows button:hover { background:#1e3549; }
.badge { font-size:.85rem; font-weight:700; color:#c5dfec; background:#254156; padding:.15rem .5rem; border-radius:.25rem; }
.thread-message { padding:.85rem 0; border-bottom:1px solid var(--line); }
.thread-message p { white-space:pre-wrap; overflow-wrap:anywhere; }
.thread-message small { margin-left:.5rem; color:var(--muted); }
#reply-form { margin-top:1rem; }
footer { justify-content:flex-start; border:0; border-top:1px solid var(--line); }
@media(max-width:560px) {
  .mast,.mast nav { gap:.45rem; }
  .pair { grid-template-columns:1fr; gap:0; }
  main { margin-top:1rem; }
}
