:root {
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #0e1525;
  background-color: #ffffff;
  --focus-border-color: rgba(107, 114, 128, 0.95);
  --focus-ring-color: rgba(107, 114, 128, 0.28);
}

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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
  display: flex;
  flex-direction: column;
}

header {
  padding: 44px 24px 28px;
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111827;
}

.page-title {
  margin: 0 auto 18px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111827;
  text-align: center;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.page-title--with-help::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  width: max-content;
  max-width: 360px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

.page-title--with-help:hover::after,
.page-title--with-help:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.panel-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.panel-title--with-help::after,
.account-filter-title--with-help::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  transform: translateY(-6px);
  background: rgba(17, 24, 39, 0.95);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
  width: max-content;
  max-width: 360px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 25;
}

.panel-title--with-help:hover::after,
.panel-title--with-help:focus-visible::after,
.account-filter-title--with-help:hover::after,
.account-filter-title--with-help:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

header .page-title {
  margin-bottom: 0;
}

.app-main {
  flex: 1;
  padding: 0 24px 56px;
  display: flex;
  justify-content: center;
}

.container {
  width: min(1180px, 100%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.panel {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px 30px;
  border: 1px solid rgba(226, 232, 240, 0.75);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.subtitle {
  max-width: 720px;
  margin: 12px auto 0;
  color: #4b5563;
  font-size: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.form-grid.report-upload-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  max-width: 860px;
}

.report-upload-grid > .upload-grid,
.report-upload-grid > .panel-subtitle,
.report-upload-grid > .actions {
  grid-column: 1 / -1;
}

.report-upload-grid > .actions {
  justify-content: flex-start;
  margin-left: 0;
}

.form-grid label,
.context-grid label,
.context-item label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.form-grid input,
.form-grid textarea,
.form-grid select,
.context-grid input,
.context-grid textarea,
.context-item input,
.context-item textarea {
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 10px 12px;
  font-size: 15px;
  color: #1f2937;
}

select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background-color: #f8fafc;
  padding: 10px 40px 10px 12px;
  font-size: 15px;
  line-height: 1.35;
  color: #0f172a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%234b5563' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px auto;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

select:not([multiple]):disabled {
  color: rgba(17, 24, 39, 0.55);
  background-color: #f3f4f6;
  cursor: not-allowed;
}

select[multiple],
select[size]:not([size="1"]) {
  appearance: auto;
  background-image: none;
  padding-right: 12px;
  background-color: #fff;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  border-color: var(--focus-border-color);
  box-shadow: 0 0 0 3px var(--focus-ring-color);
  background-color: #ffffff;
}

select option {
  color: #0f172a;
  background-color: #fff;
}

select option:hover,
select option:focus,
select option:checked {
  background-color: #e5e7eb;
  color: #0f172a;
}

select::-ms-expand {
  display: none;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select__input {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select__button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 10px 38px 10px 14px;
  font-size: 15px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.custom-select__button::after {
  content: "";
  width: 12px;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%234b5563' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  flex: 0 0 auto;
}

.custom-select__button:focus-visible {
  border-color: var(--focus-border-color);
  box-shadow: 0 0 0 3px var(--focus-ring-color);
  outline: none;
  background: #fff;
}

.custom-select--disabled .custom-select__button {
  cursor: not-allowed;
  opacity: 0.6;
}

.custom-select__label {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 260px;
  overflow-y: auto;
  z-index: 60;
  display: none;
}

.custom-select--open .custom-select__list {
  display: block;
}

.custom-select__option {
  padding: 10px 16px;
  font-size: 15px;
  color: #0f172a;
  cursor: pointer;
  transition: background-color 100ms ease, color 100ms ease;
}

.custom-select__option.is-placeholder {
  color: #6b7280;
}

.custom-select__option.is-disabled {
  cursor: not-allowed;
  color: #9ca3af;
}

.custom-select__option.is-active {
  background: rgba(79, 70, 229, 0.08);
}

.custom-select__option.is-selected {
  font-weight: 600;
  background: rgba(15, 23, 42, 0.06);
}

.custom-select__option.is-selected.is-active {
  background: rgba(17, 24, 39, 0.12);
}

.upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: stretch;
}

.upload-grid .file-field {
  flex: 1 1 calc(33.333% - 18px);
  max-width: calc(33.333% - 18px);
  min-width: 240px;
}

.upload-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  align-items: flex-start;
}

.upload-layout .upload-column {
  max-width: 420px;
  width: 100%;
}

.upload-layout .header-controls {
  margin-top: 0;
}

.multi-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
}

.multi-upload .file-field {
  flex: 1 1 calc(33.333% - 18px);
  max-width: none;
  min-width: 260px;
}

.conversation-upload-grid {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.conversation-upload-grid .file-field {
  flex: 1 1 320px;
  max-width: 420px;
}

.file-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
  max-width: 420px;
  width: 100%;
}

.file-field.compact-upload {
  margin: 0;
  align-items: flex-start;
}

.file-field.compact-upload .upload-card,
.file-field.compact-upload .selected-file {
  width: 100%;
}

.field-group.sample-select-group {
  max-width: 420px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-group.sample-select-group .select-input,
.field-group.sample-select-group .field-hint {
  width: 100%;
}

.upload-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 24px;
  background: rgba(248, 250, 252, 0.6);
  cursor: pointer;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
  text-align: center;
}

.upload-card:hover {
  border-color: rgba(30, 41, 59, 0.45);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.upload-icon img {
  width: 26px;
  height: 26px;
  display: block;
  filter: brightness(0) saturate(100%) invert(7%) sepia(9%) saturate(973%) hue-rotate(175deg) brightness(95%) contrast(90%);
}

.upload-label {
  font-size: 15px;
  font-weight: 500;
  color: #111827;
}

.selected-file {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
  min-height: 18px;
}

@media (max-width: 1024px) {
  .upload-grid .file-field,
  .multi-upload .file-field {
    flex: 1 1 calc(50% - 18px);
    max-width: none;
  }
}

@media (max-width: 640px) {
  .upload-grid {
    gap: 14px;
  }
  .upload-grid .file-field,
  .multi-upload .file-field {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}

.select-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 10px 12px;
  font-size: 15px;
  background-color: #fff;
}

.field-hint {
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

.detection-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 18px;
}

.detection-grid select,
.detection-grid input {
  min-width: 220px;
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 10px 12px;
  font-size: 15px;
  color: #1f2937;
}

.mapping-table {
  width: 100%;
  border-collapse: collapse;
}

.mapping-table th,
.mapping-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  padding: 12px 14px;
  text-align: left;
  font-size: 15px;
}

.mapping-table select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 8px 10px;
  font-size: 14px;
}

.context-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.context-item {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  background: rgba(249, 250, 251, 0.6);
}

.context-item textarea {
  min-height: 110px;
  resize: vertical;
}

.markdown-preview,
.analysis-preview {
  margin-top: 18px;
  padding: 18px;
  background: rgba(249, 250, 251, 0.75);
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.markdown-preview pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-size: 14px;
  font-family: "JetBrains Mono", "Cascadia Code", monospace;
  color: #111827;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 18px;
}

.filters-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.filters-grid input,
.filters-grid select,
.filters-grid textarea {
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 10px 12px;
  font-size: 15px;
  color: #1f2937;
}

.filters-grid textarea {
  min-height: 120px;
  resize: vertical;
}

.account-filter-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 16px;
  background: rgba(248, 250, 252, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-filter-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.account-filter-title--with-help {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-filter-mode {
  margin-bottom: 4px;
  max-width: 320px;
  width: 100%;
  align-self: flex-start;
}

.account-filter-mode label {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.account-filter-mode select {
  width: 100%;
}

.account-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.account-filter-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.account-filter-grid .account-upload-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-upload-field .field-label {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.account-upload-field .field-hint {
  font-size: 13px;
  color: #6b7280;
}

.account-upload-field .upload-card {
  align-items: center;
}

.account-filter-card select,
.account-filter-card textarea,
.account-filter-card input[type="text"],
.account-filter-card input[type="search"] {
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 10px 12px;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
}

.account-filter-card textarea {
  min-height: 120px;
  resize: vertical;
}

.account-filter-card select[multiple] {
  min-height: 190px;
}

.account-pattern-status {
  font-size: 12px;
  color: #92400e;
}

.account-summary {
  margin: 0;
  font-size: 13px;
  color: #1f2937;
}

.account-summary--inline {
  margin-bottom: 6px;
}

.account-summary--warning {
  color: #b45309;
  font-weight: 500;
}

.filters-subcard {
  grid-column: 1 / -1;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 16px;
  background: rgba(248, 250, 252, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filters-subcard--half {
  grid-column: span 1;
  min-width: 0;
}

.filters-subcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filters-subcard-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.filters-subcard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.filters-warning {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.6);
  background: rgba(254, 243, 199, 0.7);
  color: #92400e;
  font-size: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field label {
  font-size: 14px;
  letter-spacing: 0.015em;
  color: #4b5563;
  font-weight: 500;
}

.select-field {
  appearance: none;
  border-radius: 16px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 14px 18px;
  font-size: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(249, 250, 251, 0.95)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%239aa3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.6'%3E%3Cpolyline points='4 7 9 12 14 7'/%3E%3C/svg%3E")
      no-repeat right 16px center;
  background-size: auto, 16px;
  color: #0f172a;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(249, 250, 251, 0.6);
  border: 1px solid rgba(209, 213, 219, 0.7);
  border-radius: 16px;
  padding: 12px;
  min-height: 54px;
}

.pill {
  border: 1px solid rgba(209, 213, 219, 0.6);
  background: rgba(255, 255, 255, 0.94);
  color: #1f2937;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: all 120ms ease;
}

.pill:hover {
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.pill.is-selected {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.16);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(226, 232, 240, 0.75);
  padding-top: 18px;
  margin-top: 16px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  background: rgba(249, 250, 251, 0.8);
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.6);
  gap: 4px;
}

.segmented__button {
  border: none;
  background: transparent;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #4b5563;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.segmented__button--active {
  background: #111827;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.16);
}

.limit-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.limit-control__input {
  display: flex;
  align-items: center;
  gap: 12px;
}

.limit-control input[type="range"] {
  width: 180px;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111827;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.25);
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111827;
  border: none;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.25);
  cursor: pointer;
}

input[type="range"]::-moz-range-track {
  background: transparent;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  width: 42px;
  height: 22px;
  appearance: none;
  border-radius: 999px;
  background: rgba(209, 213, 219, 0.7);
  position: relative;
  transition: background 150ms ease;
}

.toggle input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 150ms ease;
}

.toggle input:checked {
  background: #111827;
}

.toggle input:checked::before {
  transform: translateX(20px);
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 14px;
  color: #4b5563;
  margin-top: 18px;
  min-height: 20px;
}

.status-bar__error {
  color: #c2410c;
  font-weight: 500;
}

.status-bar__warning {
  color: #b45309;
  font-weight: 500;
}

.prompt-wrapper {
  gap: 10px;
}

.research-wrapper {
  gap: 10px;
}

.research-issues {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.issue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.issue-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
  cursor: pointer;
}

.issue-action input {
  width: 14px;
  height: 14px;
}

.issue-edit {
  width: 100%;
  min-height: 70px;
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
}

.issue-warning {
  font-size: 13px;
  color: #b45309;
  margin-top: 6px;
}

.actions-hint {
  margin: 0;
  font-size: 13px;
  color: #6b7280;
}

.research-no-issues {
  margin-top: 8px;
  font-size: 14px;
  color: #059669;
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.prompt-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  font-size: 16px;
  line-height: 1.5;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

.code-block {
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  background: rgba(17, 24, 39, 0.92);
  color: #f9fafb;
  border-radius: 12px;
  padding: 16px;
  max-height: 440px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.panel-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 16px;
}

.panel-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #111827;
}

.panel-subtitle {
  margin: 8px 0 16px;
  font-size: 14px;
  color: #6b7280;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.upload-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.upload-controls button {
  align-self: flex-start;
  width: auto;
}

.upload-status {
  font-size: 13px;
  color: #6b7280;
}

.header-controls {
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 16px;
  padding: 16px;
  background: rgba(249, 250, 251, 0.7);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.header-controls .primary-button,
.header-controls .ghost-button {
  align-self: flex-start;
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.controls-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.controls-grid input {
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 10px 12px;
  font-size: 15px;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.mapping-form select,
.mapping-form input,
.mapping-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  font-size: 15px;
  color: #1f2937;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.mapping-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.parameters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.parameters-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.parameters-grid input,
.parameters-grid select {
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  padding: 10px 14px;
  font-size: 15px;
  color: #111827;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.parameters-grid input:focus-visible,
.parameters-grid select:focus-visible {
  border-color: var(--focus-border-color);
  box-shadow: 0 0 0 3px var(--focus-ring-color);
  outline: none;
  background-color: #fff;
}

.parameters-grid input[type="number"] {
  appearance: textfield;
}

.parameters-grid input[type="number"]::-webkit-outer-spin-button,
.parameters-grid input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
}

.actions--with-mail {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.actions__hint {
  font-size: 13px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  min-height: 20px;
}

.actions__mail {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.actions__mail-label {
  font-size: 13px;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.actions__mail-label-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.actions__mail-input {
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.8);
  padding: 10px 14px;
  font-size: 15px;
  background: #fff;
}

.mapping-form textarea {
  min-height: 90px;
  resize: vertical;
}

.range-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.range-fields label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.sampling-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

@media (max-width: 960px) {
  .sampling-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.sampling-grid__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #4b5563;
}

.sampling-grid__field[data-visible="false"] {
  visibility: hidden;
  pointer-events: none;
}

.sampling-grid select,
.sampling-grid input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  font-size: 15px;
  color: #1f2937;
  background: #ffffff;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.sampling-summary {
  margin: 12px 0 16px;
  font-size: 14px;
  color: #1f2937;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.sampling-summary p {
  margin: 0;
}

.attribute-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.attribute-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 16px;
  background: rgba(249, 250, 251, 0.7);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.attribute-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
}

.attribute-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attribute-chip {
  border: 1px solid rgba(209, 213, 219, 0.7);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: #1f2937;
  cursor: pointer;
  transition: all 120ms ease;
}

.attribute-chip.is-selected {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.14);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 15px;
  color: #4b5563;
}

.link-button {
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:disabled {
  opacity: 0.4;
  cursor: default;
  text-decoration: none;
}

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.75);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card__image {
  position: relative;
  width: 100%;
  padding-top: 66%;
  background: linear-gradient(135deg, rgba(243, 244, 246, 0.9), rgba(229, 231, 235, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card__image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__image--empty {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.9), rgba(226, 232, 240, 0.95));
  border: 1px dashed rgba(148, 163, 184, 0.45);
}

.card__image-label {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: #6b7280;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #616d7c;
}

.meta span {
  background: rgba(243, 244, 246, 0.9);
  border-radius: 999px;
  padding: 4px 10px;
}

.attributes-list {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
}

.attributes-list strong {
  color: #1f2937;
}

.empty-state {
  margin-top: 12px;
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed rgba(203, 213, 225, 0.9);
  color: #5f6a80;
  background: rgba(249, 250, 251, 0.85);
  text-align: center;
  font-size: 14px;
}

.table-section {
  margin-top: 26px;
  border-top: 1px solid rgba(226, 232, 240, 0.75);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
}

.ghost-button {
  border: 1px solid rgba(209, 213, 219, 0.7);
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  border-radius: 12px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 120ms ease;
}

.ghost-button:hover {
  border-color: rgba(148, 163, 184, 0.9);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}

.table-scroll {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: #1f2937;
  background: #ffffff;
}

thead {
  position: sticky;
  top: 0;
  background: #f3f4f6;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 600;
  color: #111827;
}

tr:last-of-type td {
  border-bottom: none;
}

.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(243, 244, 246, 0.92);
  backdrop-filter: blur(16px);
  z-index: 20;
}

.overlay[hidden] {
  display: none !important;
}

#projectsContent[hidden] {
  display: none !important;
}

#loginOverlay {
  z-index: 30;
}

.overlay__panel {
  background: #ffffff;
  border-radius: 18px;
  padding: 32px 36px;
  width: min(420px, 92%);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(226, 232, 240, 0.8);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.overlay__panel h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111827;
}

.overlay__panel p {
  margin: 0;
  font-size: 15px;
  color: #4b5563;
}

.overlay__input {
  display: flex;
  gap: 12px;
  align-items: center;
}

.overlay__input input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(203, 213, 225, 0.85);
  font-size: 16px;
}

.overlay__error {
  min-height: 20px;
  font-size: 14px;
  color: #c2410c;
}

.auth-button {
  display: flex;
  justify-content: center;
  min-height: 48px;
}

.primary-button {
  padding: 12px 24px;
  border-radius: 12px;
  background: #111827;
  color: #ffffff;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.primary-button:not(:disabled):hover {
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.18);
}

@media (max-width: 768px) {
  header {
    padding: 36px 16px 24px;
  }

  .app-main {
    padding: 0 16px 40px;
  }

  .panel {
    border-radius: 20px;
    padding: 24px;
  }

  .toolbar {
    align-items: flex-start;
  }
}

body.landing-body {
  align-items: stretch;
  justify-content: flex-start;
  padding: 40px 48px;
}

.landing-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 24px;
  margin-bottom: 48px;
}

.landing-logo-link {
  display: inline-flex;
  align-items: center;
}

.landing-logo {
  display: block;
  height: 54px;
  width: auto;
}

.landing-menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-menu__list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.landing-menu__item {
  display: flex;
  align-items: center;
}

.landing-menu__item--auth {
  margin-left: 12px;
}

.landing-menu__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-menu__link:hover,
.landing-menu__link:focus-visible {
  background: rgba(226, 232, 240, 0.55);
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.landing-menu__link[aria-disabled="true"] {
  color: #94a3b8;
  cursor: default;
  background: rgba(248, 250, 252, 0.9);
  box-shadow: none;
}

.landing-menu__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, #111827 0%, #0f172a 100%);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.landing-menu__button:hover,
.landing-menu__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
  background: linear-gradient(135deg, #0f172a 0%, #0b1120 100%);
}

.landing-login {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.landing-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: nowrap;
  min-width: 220px;
}

.landing-lang {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: #4b5563;
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 180px;
  justify-content: flex-end;
}

.landing-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  width: 100%;
  max-width: 320px;
}

.landing-auth__button {
  display: flex;
  min-height: 40px;
  width: 100%;
  justify-content: center;
}

.landing-auth__logout {
  border: none;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #4b5563;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 32px;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-auth__logout:hover,
.landing-auth__logout:focus-visible {
  color: #111827;
  background: rgba(226, 232, 240, 0.7);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.landing-auth__magic {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.landing-auth[data-state="authenticated"] .landing-auth__magic {
  display: none;
}

.landing-auth__hint {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #94a3b8;
  text-transform: uppercase;
  text-align: right;
}

.landing-auth__form {
  display: flex;
  gap: 6px;
  width: 100%;
  justify-content: flex-end;
}

.landing-auth__input {
  flex: 1 1 190px;
  border: 1px solid rgba(148, 163, 184, 0.75);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  background: transparent;
  color: #0f172a;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.landing-auth__input:focus-visible {
  outline: none;
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.landing-auth__submit {
  border: 1px solid rgba(148, 163, 184, 0.75);
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  font-weight: 500;
  font-size: 13px;
  padding: 8px 22px;
  cursor: pointer;
  min-height: 36px;
  min-width: 120px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.landing-auth__submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.landing-auth__submit:not(:disabled):hover,
.landing-auth__submit:not(:disabled):focus-visible {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.35);
  color: #0b1120;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.landing-auth__status {
  min-height: 18px;
  margin: 0;
  font-size: 12px;
  color: #475467;
  text-align: right;
}

.landing-auth__status[data-tone="success"] {
  color: #0f8b5d;
}

.landing-auth__status[data-tone="error"] {
  color: #b91c1c;
}

.landing-lang__link {
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  padding: 6px 10px;
  min-width: 32px;
  text-align: center;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.landing-lang__link.is-active {
  color: #111827;
  background: transparent;
}

.landing-lang__link:hover {
  color: #111827;
}

.landing-lang__sep {
  opacity: 0.7;
}

.landing-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.landing-section--standalone {
  max-width: 340px;
  align-self: flex-start;
}

.landing-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.landing-grid .landing-section {
  max-width: 100%;
}

.landing-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 420px;
}

.landing-section h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.015em;
  color: #1f2937;
}

.landing-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  padding: 40px 44px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.75);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.landing-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.landing-info-section {
  padding: 28px 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.75);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-info-section h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  letter-spacing: 0.01em;
}

.landing-info-section p {
  margin: 0;
  font-size: 15px;
  color: #4b5563;
  line-height: 1.65;
}

.landing-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid rgba(209, 213, 219, 0.9);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.92);
  color: #111827;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.landing-link--beta {
  opacity: 0.55;
  border-style: dashed;
}

.landing-link[data-tooltip] {
  position: relative;
}

.landing-link[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: rgba(17, 17, 17, 0.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.35;
  width: max-content;
  max-width: 260px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  z-index: 10;
}

.landing-link[data-tooltip]:hover::after,
.landing-link[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.landing-link:hover {
  border-color: rgba(148, 163, 184, 0.8);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
  transform: translateX(1px);
}

.landing-link--disabled {
  color: #94a3b8;
  background: rgba(248, 250, 252, 0.9);
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.45);
  box-shadow: none;
  cursor: default;
  transform: none;
  pointer-events: none;
}

@media (max-width: 900px) {
  .landing-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }

  .landing-section--standalone {
    max-width: 100%;
  }

  .landing-menu {
    justify-content: flex-start;
  }

  .landing-menu__list {
    gap: 16px;
    justify-content: flex-start;
  }

  .landing-hero {
    padding: 32px;
    gap: 24px;
  }

  .landing-info {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 640px) {
  body.landing-body {
    padding: 28px 20px;
  }

  .landing-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
  }

  .landing-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-width: auto;
  }

  .landing-auth {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    max-width: none;
  }

  .landing-auth__status {
    text-align: center;
  }

  .landing-auth__button {
    justify-content: center;
  }

  .landing-auth__form {
    flex-direction: column;
    gap: 8px;
  }

  .landing-auth__input {
    flex: none;
    width: 100%;
  }

  .landing-auth__submit {
    width: 100%;
  }

  .landing-lang {
    gap: 8px;
    justify-content: center;
    font-size: 14px;
    min-width: auto;
    width: 100%;
  }

  .landing-lang__link {
    padding: 5px 14px;
  }

  .landing-lang__sep {
    display: none;
  }

  .landing-logo {
    height: 42px;
  }

  .landing-link {
    padding: 12px 18px;
  }

  .landing-content {
    gap: 28px;
  }

  .landing-menu {
    width: 100%;
  }

  .landing-menu__list {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .landing-menu__item,
  .landing-menu__item--auth {
    width: 100%;
    margin-left: 0;
  }

  .landing-menu__link,
  .landing-menu__button {
    width: 100%;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    padding: 28px 24px;
  }

  .landing-info {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .landing-info-section {
    padding: 22px 20px;
    gap: 10px;
  }
}
.summary-text {
  margin: 12px 0;
  line-height: 1.5;
  color: #1f2937;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.summary-card {
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-card h4 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}

.summary-card p {
  margin: 0;
  color: #1f2937;
  font-size: 14px;
}

.summary-card--wide {
  grid-column: span 2;
}

.panel-subsection {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-subsection h3 {
  margin: 0;
  font-size: 18px;
  color: #0f172a;
}

.panel-subsection.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.panel-subsection.two-column > div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-table {
  border: 1px solid rgba(209, 213, 219, 0.6);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.summary-table h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #111827;
}

.summary-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.summary-table th,
.summary-table td {
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  padding: 6px 8px;
  text-align: left;
}

.mismatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 16px 0;
}

.mismatch-card {
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mismatch-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mismatch-actions select,
.mismatch-actions textarea {
  border-radius: 10px;
  border: 1px solid rgba(209, 213, 219, 0.7);
  padding: 8px 10px;
  font-size: 14px;
}

.mismatch-actions textarea {
  min-height: 80px;
  resize: vertical;
}

.conversation-layout {
  display: grid;
  gap: 16px;
}

.summary-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.summary-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0f172a;
}

.summary-card__image {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.chip {
  background: rgba(15, 23, 42, 0.08);
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chip:hover,
.chip:focus {
  background: rgba(15, 23, 42, 0.15);
}

.conversation-thread {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.conversation-entry {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.conversation-entry__question {
  font-weight: 600;
  margin-bottom: 8px;
}

.conversation-entry__answer {
  color: #1f2937;
  line-height: 1.45;
}

.conversation-entry__section h4 {
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.conversation-empty {
  color: rgba(15, 23, 42, 0.6);
}

.context-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.question-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}
