:root {
  --bg: #f4efe7;
  --bg-ambient: #e6d8c4;
  --panel: rgba(255, 250, 243, 0.88);
  --panel-strong: #fffdfa;
  --panel-muted: rgba(255, 255, 255, 0.68);
  --ink: #181411;
  --ink-soft: #63584d;
  --line: rgba(24, 20, 17, 0.1);
  --line-strong: rgba(24, 20, 17, 0.18);
  --accent: #b85d3d;
  --accent-strong: #95462a;
  --accent-soft: rgba(184, 93, 61, 0.1);
  --accent-soft-strong: rgba(184, 93, 61, 0.16);
  --cool: #456169;
  --cool-soft: rgba(69, 97, 105, 0.11);
  --ok: #236a4c;
  --ok-soft: rgba(35, 106, 76, 0.12);
  --warn: #946003;
  --warn-soft: rgba(148, 96, 3, 0.12);
  --error: #9d3535;
  --error-soft: rgba(157, 53, 53, 0.12);
  --radius-xxl: 32px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-lift: 0 24px 80px rgba(24, 20, 17, 0.08);
  --shadow-soft: 0 14px 40px rgba(24, 20, 17, 0.06);
  --font-sans: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", "SFMono-Regular", monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(184, 93, 61, 0.14), transparent 26%),
    radial-gradient(circle at right 16% top 12%, rgba(69, 97, 105, 0.12), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, #efe7db 100%);
  color: var(--ink);
  font-family: var(--font-sans);
}

body {
  margin: 0;
  min-height: 100vh;
  background-image:
    linear-gradient(rgba(24, 20, 17, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 20, 17, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

::selection {
  background: rgba(184, 93, 61, 0.18);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(1420px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 360px);
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.hero__copy {
  max-width: 900px;
}

.eyebrow,
.panel__label {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cool);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 0.96;
  letter-spacing: 0;
}

.hero__lede {
  max-width: 70ch;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.65;
}

.hero__meta {
  display: grid;
  gap: 14px;
  align-self: start;
}

.hero__status,
.status-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 6px rgba(148, 96, 3, 0.12);
}

.status-dot.is-ok {
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(35, 106, 76, 0.16);
}

.status-dot.is-error {
  background: var(--error);
  box-shadow: 0 0 0 6px rgba(157, 53, 53, 0.16);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(460px, 620px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: var(--radius-xxl);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lift);
}

.panel--intake {
  position: sticky;
  top: 20px;
}

.panel--intake,
.panel--results {
  padding: 0 24px 24px;
}

.panel__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 24px 0;
}

.panel__head--compact {
  padding: 0;
}

.panel__head h2,
.results-intro__title {
  margin: 0;
  font-size: 30px;
  line-height: 1.04;
}

.composer-card,
.ktru-catalog-panel,
.draft-panel,
.log-panel,
.result-card {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
}

.composer-card {
  display: grid;
  gap: 14px;
}

.composer-card__intro {
  display: grid;
  gap: 8px;
}

.field-label {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.field-label--compact {
  margin-bottom: 8px;
}

.field-note,
.submit-note,
.section-note,
.draft-item__hint {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.field-input,
.field-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffdf9;
  color: var(--ink);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

.field-input {
  min-height: 52px;
  padding: 13px 15px;
}

.field-textarea {
  min-height: 170px;
  resize: vertical;
  padding: 16px 18px;
  line-height: 1.65;
}

.field-textarea--hero {
  min-height: 220px;
}

.field-textarea--composer {
  min-height: 190px;
  border: 0;
  padding: 10px 12px 6px;
  background: transparent;
  box-shadow: none;
}

.field-input:focus,
.field-textarea:focus {
  outline: none;
  border-color: rgba(184, 93, 61, 0.45);
  box-shadow: 0 0 0 4px rgba(184, 93, 61, 0.12);
  transform: translateY(-1px);
}

.field-textarea--composer:focus {
  border: 0;
  box-shadow: none;
  transform: none;
}

.composer-shell {
  display: grid;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf9;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.composer-shell:focus-within {
  border-color: rgba(184, 93, 61, 0.45);
  box-shadow: 0 0 0 4px rgba(184, 93, 61, 0.1);
  transform: translateY(-1px);
}

.composer-shell.is-recording {
  border-color: rgba(184, 93, 61, 0.34);
  box-shadow: 0 0 0 4px rgba(184, 93, 61, 0.08);
}

.composer-shell__status {
  display: grid;
  gap: 10px;
  padding: 0 10px;
}

.composer-shell__footer,
.composer-tools,
.composer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.composer-shell__footer {
  display: grid;
  gap: 12px;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.composer-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}

.composer-tools .button {
  width: 100%;
  min-width: 0;
  padding-inline: 8px;
  white-space: nowrap;
}

.composer-actions {
  justify-content: flex-end;
}

.composer-ticker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 245, 0.86);
  color: var(--ink-soft);
}

.composer-ticker[data-state="recording"] {
  border-color: rgba(184, 93, 61, 0.24);
  background: rgba(184, 93, 61, 0.08);
  color: var(--accent-strong);
}

.composer-ticker[data-state="transcribing"] {
  border-color: rgba(148, 96, 3, 0.24);
  background: rgba(148, 96, 3, 0.08);
  color: #805100;
}

.composer-ticker[data-state="success"] {
  border-color: rgba(35, 106, 76, 0.24);
  background: rgba(35, 106, 76, 0.08);
  color: var(--ok);
}

.composer-ticker[data-state="error"] {
  border-color: rgba(157, 53, 53, 0.24);
  background: rgba(157, 53, 53, 0.08);
  color: var(--error);
}

.composer-ticker__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cool);
  box-shadow: 0 0 0 5px rgba(69, 97, 105, 0.12);
  flex: 0 0 auto;
}

.composer-ticker[data-state="recording"] .composer-ticker__dot {
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(184, 93, 61, 0.16);
  animation: pulse-dot 1.15s ease-in-out infinite;
}

.composer-ticker[data-state="transcribing"] .composer-ticker__dot {
  background: var(--warn);
  box-shadow: 0 0 0 6px rgba(148, 96, 3, 0.14);
}

.composer-ticker[data-state="success"] .composer-ticker__dot {
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(35, 106, 76, 0.14);
}

.composer-ticker[data-state="error"] .composer-ticker__dot {
  background: var(--error);
  box-shadow: 0 0 0 6px rgba(157, 53, 53, 0.14);
}

@keyframes pulse-dot {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

.composer-tips,
.meta-row,
.chip-row,
.linked-list,
.result-match__footer,
.result-match__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hint-pill,
.file-chip,
.warning-chip,
.match-badge,
.match-issue,
.summary-card,
.stat-pill,
.meta-pill,
.chip {
  border-radius: 999px;
}

.hint-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  background: rgba(24, 20, 17, 0.05);
  color: var(--ink-soft);
}

.file-list,
.warning-stack,
.draft-editor,
.results-stack,
.summary-grid,
.draft-chars,
.result-list,
.compact-list {
  display: grid;
  gap: 12px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 10px 14px;
  background: var(--cool-soft);
  color: var(--cool);
}

.action-row,
.draft-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.action-row {
  margin-top: 22px;
}

.action-row--primary {
  margin-top: 4px;
}

.action-row--editor {
  margin-top: 18px;
}

.draft-toolbar {
  justify-content: space-between;
  margin: 18px 0 0;
}

.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  margin-top: 18px;
  align-items: center;
}

.ktru-catalog-results,
.ktru-suggestions {
  display: grid;
  gap: 10px;
}

.ktru-catalog-results {
  margin-top: 12px;
}

.ktru-suggestions {
  margin-top: 10px;
}

.draft-ktru-resolution-slot:empty {
  display: none;
}

.draft-ktru-resolution {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
}

.draft-ktru-resolution--resolved {
  border-color: rgba(35, 106, 76, 0.24);
  background: rgba(35, 106, 76, 0.06);
}

.draft-ktru-resolution--ambiguous,
.draft-ktru-resolution--unresolved {
  border-color: rgba(184, 93, 61, 0.28);
  background: rgba(184, 93, 61, 0.07);
}

.draft-ktru-resolution__head,
.draft-ktru-resolution__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.catalog-pager {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.catalog-pager[hidden] {
  display: none;
}

.catalog-pager__info {
  color: var(--ink-soft);
  text-align: center;
  font-size: 14px;
}

.lookup-state {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.54);
}

.lookup-state--muted {
  border-style: dashed;
}

.draft-summary {
  margin: 0;
  color: var(--ink-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.button--primary {
  background: var(--accent);
  color: #fff8f4;
  box-shadow: 0 12px 30px rgba(184, 93, 61, 0.2);
}

.button--primary:hover {
  background: var(--accent-strong);
}

.button--secondary {
  background: var(--cool);
  color: #eef6f8;
  box-shadow: 0 12px 30px rgba(69, 97, 105, 0.18);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border-color: var(--line);
}

.button--ghost.is-active {
  border-color: rgba(69, 97, 105, 0.34);
  background: rgba(69, 97, 105, 0.1);
  color: var(--cool);
}

.button--icon {
  gap: 10px;
}

.button--icon.is-recording {
  border-color: rgba(184, 93, 61, 0.28);
  background: rgba(184, 93, 61, 0.08);
  color: var(--accent-strong);
}

.button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.button__icon svg {
  width: 18px;
  height: 18px;
}

.draft-item,
.ktru-option,
.result-match,
.compact-list__item,
.summary-card,
.log-entry {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fffdf9;
}

.draft-item {
  padding: 20px;
}

.ktru-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
}

.ktru-option--compact {
  padding: 12px;
  background: rgba(255, 253, 249, 0.76);
}

.ktru-option__main,
.ktru-option__actions {
  display: grid;
  gap: 8px;
}

.ktru-option__actions {
  justify-items: end;
}

.button--small {
  min-height: 38px;
  padding: 7px 13px;
}

.draft-item__head,
.draft-item__identity,
.result-card__head,
.result-match__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.draft-item__identity {
  align-items: flex-start;
}

.draft-item__index {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 20, 17, 0.06);
  color: var(--ink-soft);
  white-space: nowrap;
}

.draft-item__hint {
  margin-top: 14px;
}

.draft-item__actions {
  margin-top: 14px;
}

.char-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.status-strip {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
}

.status-strip--sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  box-shadow: none;
}

.status-strip.is-success {
  border-color: rgba(35, 106, 76, 0.25);
  background: rgba(255, 252, 245, 0.96);
  color: var(--ok);
}

.status-strip.is-warning {
  border-color: rgba(148, 96, 3, 0.22);
  background: rgba(255, 252, 245, 0.96);
  color: var(--warn);
}

.status-strip.is-error {
  border-color: rgba(157, 53, 53, 0.22);
  background: rgba(255, 252, 245, 0.96);
  color: var(--error);
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
}

.summary-card {
  padding: 18px;
}

.summary-card__label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.summary-card__value {
  margin: 10px 0 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0;
}

.live-feed-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.panel--results > .panel__head {
  align-items: center;
}

.live-feed-summary {
  color: var(--ink-soft);
  font-size: 14px;
}

.live-feed-panel[hidden] {
  display: none;
}

.live-feed-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.78);
  box-shadow: var(--shadow-soft);
}

.live-feed-panel__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.live-feed-panel__head h3 {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.1;
}

.live-feed-panel .log-list {
  min-height: 72px;
  max-height: 360px;
  padding: 0;
  overflow: auto;
}

.live-feed-panel .log-list:empty::before {
  content: "Событий пока нет. После запуска подбора здесь появятся шаги обработки.";
  display: block;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  line-height: 1.55;
  background: rgba(255, 255, 255, 0.5);
}

.results-intro {
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.results-intro__title {
  font-size: 22px;
}

.warning-chip {
  padding: 12px 14px;
  border: 1px solid rgba(148, 96, 3, 0.18);
  background: var(--warn-soft);
  color: #7b4d00;
}

.warning-chip--error {
  border-color: rgba(157, 53, 53, 0.18);
  background: var(--error-soft);
  color: #8a2d2d;
}

.stat-pill,
.meta-pill,
.match-badge,
.match-issue,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
}

.stat-pill,
.meta-pill {
  background: rgba(24, 20, 17, 0.05);
  color: var(--ink-soft);
}

.chip {
  background: var(--accent-soft);
  color: var(--accent);
}

.match-badge {
  font-weight: 700;
  border: 1px solid transparent;
}

.match-badge--full {
  border-color: rgba(35, 106, 76, 0.22);
  background: var(--ok-soft);
  color: var(--ok);
}

.match-badge--partial {
  border-color: rgba(148, 96, 3, 0.22);
  background: var(--warn-soft);
  color: #7b4d00;
}

.match-badge--fallback {
  border-color: rgba(184, 93, 61, 0.2);
  background: var(--accent-soft);
  color: var(--accent);
}

.match-issue {
  background: rgba(148, 96, 3, 0.08);
  color: #7b4d00;
}

.result-card {
  display: grid;
  gap: 18px;
}

.result-card__head h3,
.result-match__head h4,
.compact-list__title {
  margin: 0;
}

.result-card__head h3 {
  font-size: 28px;
  line-height: 1.06;
}

.result-card__section {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.result-card__section-title {
  margin: 0;
  font-size: 18px;
}

.result-card__section-note,
.result-match__reason,
.compact-list__meta {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.result-match {
  padding: 16px;
  box-shadow: 0 6px 18px rgba(24, 20, 17, 0.03);
}

.result-match__head h4 {
  font-size: 19px;
  line-height: 1.2;
}

.result-match__reason {
  margin-top: 10px;
}

.result-match__issues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.link-inline {
  color: var(--cool);
  text-decoration: none;
  border-bottom: 1px solid rgba(69, 97, 105, 0.26);
}

.link-inline:hover {
  border-color: rgba(69, 97, 105, 0.55);
}

.code {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(24, 20, 17, 0.06);
  font-family: var(--font-mono);
}

.result-disclosure,
.log-disclosure {
  margin-top: 16px;
}

.result-disclosure summary,
.log-disclosure summary {
  cursor: pointer;
  color: var(--cool);
  font-weight: 600;
  list-style: none;
}

.result-disclosure summary::-webkit-details-marker,
.log-disclosure summary::-webkit-details-marker {
  display: none;
}

.result-disclosure__content {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.compact-list {
  gap: 10px;
}

.compact-list__item {
  padding: 14px 16px;
}

.compact-list__meta {
  margin-top: 8px;
}

.log-panel {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.log-list {
  display: grid;
  gap: 10px;
  max-height: 320px;
  overflow: auto;
}

.log-entry {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.log-entry__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.log-entry__message {
  margin: 0;
  line-height: 1.55;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.48);
}

.empty-state--editor {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-state--results {
  min-height: 128px;
  display: flex;
  align-items: center;
  border-style: solid;
  background: rgba(255, 253, 249, 0.72);
}

@media (min-width: 1221px) {
  html,
  body {
    height: 100%;
  }

  body {
    overflow: hidden;
  }

  .page-shell {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-bottom: 28px;
  }

  .workspace {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .panel--intake,
  .panel--results {
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }

  .panel--intake {
    position: static;
    top: auto;
  }
}

@media (max-width: 1220px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .panel--intake {
    position: static;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    padding-top: 18px;
  }

  .panel--intake,
  .panel--results {
    padding: 0 18px 18px;
  }

  .panel__head {
    padding: 18px 18px 0;
  }

  .live-feed-controls,
  .live-feed-panel__head {
    width: 100%;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .composer-tools {
    grid-template-columns: 1fr;
  }

  .action-row,
  .composer-shell__footer,
  .composer-tools,
  .composer-actions,
  .draft-toolbar,
  .results-intro,
  .live-feed-controls,
  .live-feed-panel__head,
  .draft-item__head,
  .draft-item__identity,
  .result-card__head,
  .result-match__head {
    flex-direction: column;
  }

  .char-row {
    grid-template-columns: 1fr;
  }

  .lookup-row,
  .catalog-pager,
  .ktru-option {
    grid-template-columns: 1fr;
  }

  .ktru-option__actions {
    justify-items: stretch;
  }

  .button {
    width: 100%;
    justify-content: center;
  }

  .composer-actions {
    justify-content: stretch;
  }
}
