:root {
  color-scheme: light;
  --ink: #1d2633;
  --muted: #6d7785;
  --line: #d9dee7;
  --paper: #f6f7fb;
  --card: #ffffff;
  --accent: #5367e8;
  --accent-dark: #3d4fca;
  --soft-accent: #eef0ff;
  --warning: #fff4d8;
  --warning-ink: #75530a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(circle at top left, #e9ecff 0, transparent 34rem), var(--paper);
  color: var(--ink);
}

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

.hero {
  max-width: 680px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.lede {
  max-width: 580px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.6;
}

.card {
  border: 1px solid rgba(217, 222, 231, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(47, 57, 86, 0.08);
}

.controls-card {
  padding: 24px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 750;
}

.url-row {
  display: flex;
  gap: 10px;
}

input[type="url"],
input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  font: inherit;
}

input:focus {
  outline: 3px solid rgba(83, 103, 232, 0.2);
  border-color: var(--accent);
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 0 15px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

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

.primary {
  flex: 0 0 auto;
  min-height: 48px;
  color: white;
  background: var(--accent);
}

.primary:hover:not(:disabled) {
  background: var(--accent-dark);
}

.secondary {
  color: var(--ink);
  background: #eef0f5;
}

.secondary:hover:not(:disabled) {
  background: #e3e6ee;
}

.options {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 20px;
  margin-top: 18px;
}

.option {
  width: 150px;
  margin: 0;
}

.option input {
  min-height: 38px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 9px;
  color: var(--muted);
  font-weight: 600;
}

.checkbox-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.status {
  min-height: 22px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status.error {
  color: #b43542;
}

.status.success {
  color: #26734d;
}

.details {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 18px 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.details strong {
  color: var(--ink);
}

.details strong,
.details span {
  display: block;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 7px;
}

.chip {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--soft-accent);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 750;
}

.output-card {
  overflow: hidden;
}

.output-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.tabs,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tab {
  min-height: 36px;
  color: var(--muted);
  background: transparent;
}

.tab.active {
  color: var(--accent-dark);
  background: var(--soft-accent);
}

.output {
  min-height: 420px;
  max-height: 70vh;
  overflow: auto;
  margin: 0;
  padding: 24px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #303946;
  background: #fbfcff;
  font: 0.95rem/1.72 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.warnings {
  padding: 11px 17px;
  color: var(--warning-ink);
  background: var(--warning);
  font-size: 0.86rem;
}

.warnings p {
  margin: 0;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 16px 2px 0;
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 680px) {
  .shell {
    padding-top: 38px;
  }

  .url-row,
  .output-toolbar,
  .details,
  footer {
    align-items: stretch;
    flex-direction: column;
  }

  .primary {
    width: 100%;
  }

  .chips {
    justify-content: start;
  }

  .actions button {
    flex: 1;
  }
}
