.trhs { --ink:#172b37; --teal:#126259; --line:#d3dfdf; --paper:#fff; color:var(--ink); font-family:inherit; }
.trhs [hidden] { display:none !important; }
.trhs *, .trhs *::before, .trhs *::after { box-sizing:border-box; }
.trhs button, .trhs input, .trhs textarea, .trhs select { font:inherit; }
#trhs-widget button, .trhs-row { cursor:pointer; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:7px; padding:.5em .85em; line-height:1.4; text-transform:none; letter-spacing:normal; }
#trhs-widget button:focus-visible, .trhs :focus-visible { outline:3px solid #177e8d; outline-offset:2px; }
#trhs-widget button:disabled { cursor:wait; opacity:.6; }
#trhs-widget .trhs-launch {
  position:fixed;
  z-index:100002;
  right:calc(18px + env(safe-area-inset-right, 0px));
  bottom:calc(20px + env(safe-area-inset-bottom, 0px));
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  min-width:48px;
  padding:0 17px 0 14px;
  border:1px solid transparent;
  border-radius:999px;
  background:var(--teal);
  color:#fff;
  font-size:15px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
  box-shadow:0 2px 9px #102e3933;
}
.trhs-launch-icon { width:23px; height:23px; flex:none; }
@media (hover:hover) {
  #trhs-widget .trhs-launch:hover { background:#0c504a; }
}
#trhs-widget .trhs-launch:focus-visible {
  outline:3px solid #172b37;
  outline-offset:3px;
  box-shadow:0 0 0 3px #fff;
}
@media (max-width:480px) {
  #trhs-widget .trhs-launch {
    --trhs-launch-size:52px;
    left:calc(var(--trhs-visible-right, 100%) - var(--trhs-launch-size) - 14px - env(safe-area-inset-right, 0px));
    top:calc(var(--trhs-visible-bottom, 100%) - var(--trhs-launch-size) - 16px - env(safe-area-inset-bottom, 0px));
    right:auto;
    bottom:auto;
    width:var(--trhs-launch-size);
    height:var(--trhs-launch-size);
    padding:0;
  }
  .trhs-launch-label { display:none; }
  .trhs-launch-icon { width:26px; height:26px; }
}
#trhs-dialog { inset:auto max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) auto; position:fixed; margin:0; width:min(424px,calc(100vw - 24px)); max-width:none; max-height:calc(100dvh - 24px); height:min(620px,calc(100dvh - 24px)); padding:0; color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:16px; box-shadow:0 15px 70px #0d26282e; font-size:15px; line-height:1.55; }
#trhs-dialog[open] { display:flex; flex-direction:column; animation:trhs-in .15s ease-out both; }
#trhs-dialog::backdrop { background:#0b232835; }
@keyframes trhs-in { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }
.trhs-heading { display:flex; justify-content:space-between; align-items:center; background:#edf5f1; padding:18px 22px 14px; }
.trhs-heading small { color:#385d56; font-size:12px; }
#trhs-dialog h2, #trhs-dialog h3 { color:var(--ink); font-family:inherit; letter-spacing:-.02em; font-weight:700; }
#trhs-dialog h2 { margin:2px 0 0; font-size:24px; line-height:1.25; }
#trhs-dialog h3 { font-size:17px; line-height:1.45; margin:0 0 8px; }
.trhs-nav { display:flex; border-bottom:1px solid var(--line); padding:0 14px; gap:2px; }
#trhs-widget .trhs-nav button { flex:1; border-radius:0; border:0; border-bottom:3px solid transparent; min-height:44px; }
#trhs-widget .trhs-nav button[aria-current=true] { color:var(--teal); border-bottom-color:var(--teal); font-weight:700; }
.trhs-body { padding:19px 21px; overflow:auto; overscroll-behavior:contain; flex:1; min-height:0; }
.trhs form { margin:0 0 13px; }
.trhs form label { display:block; font-weight:600; margin:0 0 12px; }
.trhs :is(textarea,select,input:not([type=checkbox])) { width:100%; margin-top:4px; max-width:100%; padding:9px; border:1px solid #879d9b; border-radius:6px; background:white; color:#182d38; line-height:1.4; }
.trhs textarea { resize:vertical; }
.trhs fieldset { margin:8px 0; padding:0; border:0; }
.trhs fieldset label { font-weight:400; }
#trhs-widget .trhs-primary { color:#fff; background:var(--teal); border-color:var(--teal); font-weight:700; }
.trhs a { color:#0c635c; text-decoration:underline; text-underline-offset:3px; }
.trhs-hint, .trhs-message small, .trhs-row small { color:#475c66; }
.trhs p { margin:0 0 .75em; }
.trhs-feedback:not(:empty) { margin:8px 0; background:#f0f5f2; padding:10px 14px; overflow-wrap:anywhere; }
#trhs-dialog .trhs-feedback { margin:0; }
#trhs-results article { border-top:1px solid var(--line); padding:13px 0; }
#trhs-history, #trhs-refs { display:grid; gap:7px; margin:0 0 12px; }
.trhs-messages { max-height:35vh; overflow:auto; overflow-wrap:anywhere; margin:12px 0; }
.trhs-message { padding:8px 12px; margin:0 0 8px; border-left:3px solid #aab9bd; background:#f6f8f9; }
.trhs-message.staff { border-color:var(--teal); background:#eff6f0; }
.trhs-message p { white-space:pre-wrap; margin:2px 0; }
.trhs-tools { display:flex; align-items:center; gap:16px; margin:12px 0; }
.trhs-columns { display:grid; grid-template-columns:minmax(180px,1fr) minmax(280px,2fr); gap:20px; max-width:1000px; }
.trhs-columns section { min-width:0; }
.trhs-row { display:block; text-align:left; width:100%; margin-bottom:4px; }
.trhs-row small { display:block; }
.trhs-admin .trhs-messages { max-height:45vh; }
@media(max-width:620px) {
  .trhs-columns { grid-template-columns:1fr; }
  .trhs :is(textarea,select,input) { font-size:16px; }
}
@media (max-width:620px), (hover:none) and (pointer:coarse) and (max-height:500px) {
  #trhs-dialog {
    container:trhs-dialog / inline-size;
    --trhs-sheet-height:min(650px, calc(var(--trhs-visible-height, 100dvh) * .92));
    width:var(--trhs-visible-width, 100%);
    height:var(--trhs-sheet-height);
    max-height:none;
    left:calc(var(--trhs-visible-right, 100%) - var(--trhs-visible-width, 100%));
    top:calc(var(--trhs-visible-bottom, 100%) - var(--trhs-sheet-height));
    right:auto;
    bottom:auto;
    border-radius:16px 16px 0 0;
    padding:0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
  }
  #trhs-dialog :is(textarea,select,input) { font-size:16px; }
}
@container trhs-dialog (max-width:300px) {
  .trhs-nav { padding-inline:4px; }
  #trhs-widget .trhs-nav button {
    min-width:0;
    padding-inline:3px;
    white-space:normal;
    word-break:keep-all;
    overflow-wrap:anywhere;
  }
}
@media(prefers-reduced-motion:reduce) { #trhs-dialog[open] { animation:none; } }
