.noise-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 24px;
}

.noise-actions, .noise-toolbar, .noise-row-actions, .noise-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.noise-actions { align-self: flex-end; }
.noise-note {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-left: 3px solid #77a990;
  border-radius: 0 8px 8px 0;
  background: #eef5ef;
  color: #445950;
  font-size: 14px;
}
.noise-note p { margin: 4px 0; }
.noise-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.noise-count {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #d1e4d7;
  border-radius: 999px;
  background: #f6fbf7;
  color: #295442;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.noise-count strong { color: var(--deep); }
.noise-toolbar { margin: 0 0 12px; gap: 8px 14px; }
.noise-toolbar label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
}

:is(.noise-toolbar, .noise-form) :is(input:not([type='checkbox'], [type='radio'], [type='hidden']), select, textarea) {
  min-width: 0;
  max-width: 100%;
  min-height: 41px;
  border: 1px solid #cbdad0;
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.noise-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  scrollbar-color: #a6bfb0 #f2f7f3;
}
.noise-table {
  width: 100%;
  min-width: 830px;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}
.noise-table th, .noise-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 11px;
  vertical-align: top;
  text-align: left;
  overflow-wrap: anywhere;
}
.noise-table th {
  background: #edf5ef;
  color: #28473b;
  font-weight: 700;
}
.noise-table th:nth-child(1) { width: 15%; }
.noise-table th:nth-child(2) { width: 24%; }
.noise-table th:nth-child(3) { width: 17%; }
.noise-table th:nth-child(4) { width: 11%; }
.noise-table th:nth-child(5) { width: 16%; }
.noise-table th:nth-child(6) { width: 17%; }
.noise-table tbody tr:last-child td { border-bottom: 0; }
.noise-table tbody tr:hover, .noise-table tbody tr:focus-within { background: #f8fbf8; }
.noise-table td > strong, .noise-table td > small, .noise-table td > time { display: block; }
.noise-table td > small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.noise-table td p { margin: 4px 0; }
.noise-row-actions { gap: 5px; }
.noise-row-actions :is(.button, .button-secondary, .noise-secondary, .noise-danger) {
  min-height: 34px;
  padding: 4px 8px;
  font-size: 13px;
}
.noise-status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #d6e1d9;
  border-radius: 999px;
  background: #f1f5f2;
  color: #43564d;
  font-size: 13px;
  font-weight: 650;
}
.noise-status[data-kind='sent'] { background: #edf4fa; border-color: #cddfeb; color: #2c536d; }
.noise-status[data-kind='registered'] { background: #edf2f8; border-color: #d0ddeb; color: #344c70; }
.noise-status[data-kind='review'] { background: #fcf4df; border-color: #ead8a9; color: #694c17; }
.noise-status[data-kind='answered'] { background: var(--mint); border-color: #badfc8; color: #24513e; }
.noise-status[data-kind='closed'] { background: #e9efeb; border-color: #cedbd1; color: #3e5549; }
.noise-status[data-kind='forwarded'] { background: #f2eef9; border-color: #ddcdec; color: #664682; }
.noise-status[data-kind='appealed'] { background: #fceeed; border-color: #eccac4; color: #7c3f36; }
.noise-page .noise-heading { margin-bottom: 12px; }
.nav a.nav-subsection { margin-left: 22px; font-size: 14px; }
.noise-table summary { cursor: pointer; color: var(--green); margin-block: 4px; font-weight: 600; }
.noise-table :is(.noise-history, .noise-responses) { list-style: none; padding: 0; margin: 5px 0 0; }
.noise-table :is(.noise-history li, .noise-answer) { margin-block: 5px; }
.noise-multiline { white-space: pre-wrap; }
.noise-check.is-late { color: #9a372f; font-weight: 650; }
.noise-player { display: block; width: 100%; max-height: 65vh; background: #182f2a; border-radius: 9px; }
.noise-player ~ .noise-actions { margin-top: 12px; }
.noise-clip {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.noise-empty {
  margin: 0;
  padding: 22px 18px;
  border: 1px dashed #bacbc0;
  border-radius: 12px;
  background: var(--white);
  color: var(--muted);
}
.noise-table td.noise-empty { border: 0; }

.noise-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: 100%;
  max-height: calc(100% - 32px);
  max-height: calc(100dvh - 32px);
  padding: clamp(16px, 3vw, 27px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 60px #182f2a35;
}
.noise-dialog::backdrop { background: #182f2a85; }
.noise-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 13px;
  margin-bottom: 17px;
}
.noise-dialog-close { flex: 0 0 auto; }
.noise-form { display: grid; gap: 14px; }
.noise-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
  min-width: 0;
}
.noise-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.noise-field {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}
.noise-full { grid-column: 1 / -1; }
.noise-subheading {
  margin: 7px 0 0;
  color: var(--deep);
  font-size: 17px;
  font-weight: 700;
}
.noise-field input, .noise-field select, .noise-field textarea { width: 100%; }
.noise-form textarea { min-height: 100px; resize: vertical; }
.noise-form input[type='file'] { color: var(--muted); }
.noise-form input::file-selector-button {
  margin-right: 8px;
  padding: 3px 7px;
  border: 1px solid #cbdad0;
  border-radius: 6px;
  background: #f3f8f4;
  color: var(--green);
  font: inherit;
  cursor: pointer;
}
:is(.noise-form, .noise-toolbar) textarea:focus-visible, .noise-table-wrap:focus-visible {
  outline: 3px solid #7abe9d;
  outline-offset: 3px;
}
.noise-form-actions {
  justify-content: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.noise-form-actions > .noise-danger:first-child { margin-inline-end: auto; }
.noise-alert {
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #e8c8c2;
  border-radius: 8px;
  background: #fff3f0;
  color: #7c3026;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.noise-alert:empty, :is(.noise-alert, .noise-field, .noise-fields, .noise-responses, .noise-files)[hidden] { display: none; }
.noise-responses, .noise-files {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.noise-response, .noise-file {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf7;
  overflow-wrap: anywhere;
}
.noise-response p { margin: 4px 0; }
.noise-file { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.noise-file a { min-width: 0; overflow-wrap: anywhere; }
.noise-file :is(video, audio) { max-width: 100%; }
.noise-secondary, .noise-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 7px 12px;
  border: 1px solid #d7e5db;
  border-radius: 7px;
  background: #f5faf6;
  color: var(--green);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.noise-secondary:hover { background: #eaf6ee; }
.noise-danger { border-color: #e8c8c2; background: #fff5f3; color: #822f25; }
.noise-danger:hover { background: #fce8e3; }
:is(.noise-row-actions, .noise-form-actions, .noise-actions) button:disabled { opacity: .62; cursor: default; }

@media (max-width: 710px) {
  .noise-table th, .noise-table td { padding-inline: 9px; }
  .noise-row-actions :is(.button, .button-secondary, .noise-secondary, .noise-danger) { min-height: 39px; }
}

@media (max-width: 560px) {
  .noise-fields { grid-template-columns: minmax(0, 1fr); }
  .noise-form-actions { justify-content: flex-start; }
  .noise-form-actions > .noise-danger:first-child { margin-inline-end: 0; }
}

@media (max-width: 380px) {
  .noise-toolbar label { width: 100%; }
  .noise-toolbar :is(input, select) { width: 100%; }
  .noise-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
}
