:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #5f6b7a;
  --border: #d8dee8;
  --accent: #2457d6;
  --accent-soft: #e9efff;
  --danger: #b3261e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 4px;
}

.brand-logo {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

p {
  margin: 0;
  color: var(--muted);
}

.info-panel {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.info-panel summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  user-select: none;
}

.info-panel summary::-webkit-details-marker {
  display: none;
}

.info-panel summary::after {
  content: "\25B8"; /* right-pointing triangle */
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.15s ease;
}

.info-panel[open] summary::after {
  transform: rotate(90deg);
}

.info-panel summary:hover {
  background: var(--accent-soft);
}

.info-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-style: italic;
  font-weight: 700;
  font-size: 13px;
  font-family: Georgia, "Times New Roman", serif;
}

.info-body {
  padding: 4px 16px 18px;
  border-top: 1px solid var(--border);
}

.info-body p {
  margin: 12px 0;
  color: var(--text);
}

.info-body ul {
  margin: 8px 0;
  padding-left: 20px;
}

.info-body li {
  margin: 4px 0;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  margin-top: 4px;
}

.info-body h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.info-hint {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 1px 8px;
}

.info-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.info-contacts {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.info-contacts a {
  color: var(--accent);
  text-decoration: none;
}

.info-contacts a:hover {
  text-decoration: underline;
}

.console-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 12px 0 6px;
}

.console-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.memory-info {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.status-pill {
  min-width: 150px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.status-pill.ready {
  border-color: #8cbf90;
  background: #eef9ef;
  color: #25602a;
}

.status-pill.error {
  border-color: #e3aaa6;
  background: #fff0ef;
  color: var(--danger);
}

.drop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

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

.drop-zone {
  position: relative;
  display: grid;
  gap: 8px;
  min-height: 150px;
  align-content: center;
  justify-items: center;
  padding: 22px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  text-align: center;
}

.drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone.filled {
  border-style: solid;
  border-color: #8cbf90;
  background: #f2faf3;
}

.drop-zone.invalid {
  border-style: solid;
  border-color: #e3aaa6;
  background: #fff0ef;
}

.drop-summary {
  word-break: break-word;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.drop-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  min-height: auto;
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 15px;
}

.drop-clear:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.drop-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
}

.drop-emph {
  font-weight: 800;
  color: var(--accent);
}

.drop-summary {
  color: var(--muted);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.controls,
.progress-panel,
.report-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.controls {
  display: flex;
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-bottom: 16px;
}

.field {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

select,
button {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

select {
  padding: 0 32px 0 10px;
}

button {
  padding: 0 14px;
  cursor: pointer;
}

button#runButton {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

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

.progress-panel {
  padding: 14px;
  margin-bottom: 16px;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

progress {
  display: block;
  width: 100%;
  height: 14px;
}

.log {
  height: 112px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: #101820;
  color: #d7e5f2;
  white-space: pre-wrap;
}

.report-panel {
  padding: 0;
  overflow: hidden;
}

#reportFrame {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: white;
}

.site-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.footer-logo {
  width: 120px;
  height: 44px;
  object-fit: contain;
}

.footer-logo-link {
  display: inline-flex;
  transition: opacity 0.15s ease;
}

.footer-logo-link:hover {
  opacity: 0.7;
}

.footer-copyright {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 760px) {
  .header,
  .controls {
    display: grid;
  }

  .drop-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }
}
