.inq-tabs, .inq-toolbar, .inq-dialog-head, .inq-actions, .inq-proof {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem;
}

.inq-tabs { margin: .9rem 0; border-bottom: 1px solid var(--line, #ccd6d2); }
.inq-tabs a { padding: .65rem .7rem; color: inherit; text-decoration: none; border-bottom: 3px solid transparent; }
.inq-tabs a[aria-current="page"] { border-color: var(--navy, #0b2a5b); font-weight: 700; }
.inq-toolbar { justify-content: space-between; margin-bottom: .8rem; }
.inq-toolbar h2, .inq-dialog-head h2 { margin: 0; }
.inq-dialog-head h2 { min-width: 0; flex: 1 1 14rem; overflow-wrap: anywhere; }
.inq-filters { margin: 1rem 0; }
.inq-list { list-style: none; margin: 0; padding: 0; }
.inq-list > li { margin: 0; padding: .35rem 0; }
.inq-list .inq-row {
  display: grid;
  grid-template-columns: minmax(5rem, .75fr) minmax(0, 2.5fr) minmax(7rem, 1fr) minmax(7rem, 1fr);
  align-items: center;
  gap: .65rem 1rem;
  width: 100%;
  min-width: 0;
  text-align: left;
  overflow-wrap: anywhere;
  border: 1px solid var(--line, #ccd6d2);
  color: var(--ink, #17302a);
  background: var(--paper, #fff);
  padding: .8rem;
  border-radius: .45rem;
}
.inq-list .inq-row:hover { background: #f3f7f4; }
.inq-subject, .inq-kind { display: grid; min-width: 0; gap: .2rem; }
.inq-subject span, .inq-kind span, .inq-date { color: var(--muted, #4d635a); font-size: .9rem; }
.inq-channel { font-size: .88rem; font-weight: 650; }
.inq-dialog {
  width: min(46rem, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: clamp(1rem, 3vw, 1.65rem);
  border: 1px solid var(--line, #ccd6d2);
  border-radius: .7rem;
  color: var(--ink, #17302a);
  background: var(--paper, #fff);
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
.inq-dialog::backdrop { background: rgb(16 34 29 / 52%); }
.inq-dialog-head { justify-content: space-between; align-items: start; margin-bottom: .7rem; }
.inq-dialog form, .inq-dialog input, .inq-dialog select, .inq-dialog textarea { min-width: 0; }
.inq-dialog .fields > * { min-width: 0; }
.inq-dialog h3 { margin: 1rem 0 .55rem; }
.inq-message, .inq-history-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.inq-message {
  max-height: 38vh;
  min-height: 3.5rem;
  padding: .75rem;
  margin: 0 0 1rem;
  overflow: auto;
  background: #f5f7f6;
  border: 1px solid var(--line, #ccd6d2);
  border-radius: .4rem;
}
.inq-history-text { max-height: 14rem; overflow: auto; }
.inq-candidates { padding-left: 1.25rem; }
.inq-candidates span { display: block; color: var(--muted, #4d635a); }
.inq-actions { margin-bottom: .9rem; }
.inq-actions button { max-width: 100%; text-align: left; white-space: normal; }
.inq-actions button[aria-expanded="true"] { outline: 2px solid var(--navy, #0b2a5b); outline-offset: 2px; }
.inq-actions .inq-recommended { background: #326bb4; color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #326bb4; }
.inq-ai { padding: .45rem .55rem; border-inline-start: .24rem solid #956021; background: #fff6e7; border-radius: .2rem; }
.inq-proof { margin-top: .4rem; font-size: .86rem; color: #67420f; justify-content: space-between; }
.inq-proof label { display: inline-flex; align-items: center; gap: .3rem; }
.inq-proof input { width: 1rem; height: 1rem; margin: 0; }
.inq-error { color: #8a2525; margin-top: .75rem; }
.inq-dialog button:disabled, form[data-action="create"] button:disabled { cursor: default; }

@media (max-width: 680px) {
  .inq-list .inq-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .inq-subject { grid-column: 1 / -1; grid-row: 2; }
  .inq-date { grid-column: 2; grid-row: 1; text-align: end; }
  .inq-kind { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .35rem .6rem; align-items: baseline; }
  .inq-dialog {
    position: fixed;
    inset: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
  }
  .inq-dialog-head h2 { flex-basis: 10rem; }
}

.inq-toolbar button:not(.secondary):not([disabled]), [data-inq-register-open] {
  min-height: 2.5rem; padding: .5rem 1rem; border: 0; border-radius: .6rem;
  background: var(--navy, #0b2a5b); color: #fff; font-weight: 600; cursor: pointer;
}
[data-inq-register-open][disabled] { opacity: .5; cursor: default; }
