:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #182230;
  --muted: #667085;
  --line: #d0d5dd;
  --soft: #eef2f6;
  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --success-bg: #ecfdf3;
  --success-text: #027a48;
  --danger-bg: #fef3f2;
  --danger-text: #b42318;
  --warn-bg: #fffaeb;
  --warn-text: #b54708;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto 64px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1;
  max-width: 760px;
  margin-bottom: 16px;
}

h2 {
  font-size: 20px;
  margin-bottom: 16px;
}

h3 {
  font-size: 16px;
  margin: 24px 0 12px;
}

.subtle {
  color: var(--muted);
  line-height: 1.55;
  max-width: 760px;
}

.compact {
  margin-bottom: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(16, 24, 40, 0.06);
  padding: 22px;
  margin-bottom: 20px;
}

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

.drop-zone {
  align-items: center;
  background: var(--soft);
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease;
}

.drop-zone:hover {
  background: #f1f5f9;
  border-color: var(--primary);
}

.drop-zone input {
  display: none;
}


.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.field span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field input {
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font: inherit;
  padding: 11px 12px;
  width: min(420px, 100%);
}

.field input:focus {
  border-color: var(--primary);
  outline: 3px solid rgba(29, 78, 216, 0.12);
}

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

button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  padding: 11px 16px;
}

button:hover {
  border-color: var(--primary);
}

button.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

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

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

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

.chip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 10px;
}

.optional .chip {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.result-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
}

.badge.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge.error {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.badge.warning {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.summary {
  background: #0f172a;
  border-radius: 14px;
  color: #e2e8f0;
  overflow-x: auto;
  padding: 16px;
  white-space: pre-wrap;
}

table {
  border-collapse: collapse;
  font-size: 14px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f8fafc;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
}

.hidden {
  display: none;
}

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

  .hero {
    flex-direction: column;
  }
}

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

.text-input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  display: block;
  font: inherit;
  margin-bottom: 8px;
  max-width: 520px;
  padding: 12px 14px;
  width: 100%;
}

.text-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
  outline: none;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.field input:focus {
  outline: 3px solid rgba(29, 78, 216, 0.16);
  border-color: var(--primary);
}
