:root {
  color-scheme: dark;
  --bg: #0b0b0c;
  --bg-accent: #151516;
  --panel: rgba(18, 18, 18, 0.9);
  --panel-edge: rgba(255, 255, 255, 0.12);
  --text: #f3f3f3;
  --muted: #a5a5aa;
  --accent: #ffffff;
  --accent-soft: #d8d8dc;
  --success: #d5d5d9;
  --danger: #ff8c8c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.08), transparent 26%),
    radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.06), transparent 18%),
    linear-gradient(180deg, #050505 0%, #101011 54%, #161618 100%);
  color: var(--text);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, serif;
}

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

.hero {
  padding: 24px 4px 28px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.32));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font: 700 0.8rem/1.2 ui-monospace, "SFMono-Regular", Menlo, monospace;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 1.2rem;
}

.intro,
label,
.status,
input,
textarea,
button,
select,
.pill,
.log,
#results {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
}

.intro {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1rem;
}

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

.panel {
  background:
    linear-gradient(180deg, rgba(31, 31, 33, 0.94), rgba(10, 10, 11, 0.94)),
    linear-gradient(130deg, rgba(255, 255, 255, 0.04), transparent 55%);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  backdrop-filter: blur(10px);
}

.panel-status {
  margin-bottom: 20px;
}

.panel-heading,
.inline-row,
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-heading {
  margin-top: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: var(--accent-soft);
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.muted-pill {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

label {
  display: block;
  margin: 18px 0 8px;
  color: #ececef;
  font-size: 0.92rem;
}

input,
textarea,
button,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 0.95rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(244, 180, 0, 0.45);
  outline-offset: 2px;
}

input[type="file"] {
  border-style: dashed;
}

textarea {
  resize: vertical;
  min-height: 240px;
}

button {
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #cfcfd3 100%);
  color: #0c0c0d;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.status {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--success);
  line-height: 1.6;
}

.status.secondary {
  margin-top: 10px;
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.status.error {
  color: var(--danger);
  border-color: rgba(255, 143, 122, 0.25);
  background: rgba(255, 143, 122, 0.08);
}

.log {
  color: var(--muted);
  white-space: pre-wrap;
  max-height: 240px;
  overflow: auto;
}

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

#results {
  margin-top: 14px;
  min-height: 160px;
}

.result {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.result:first-child {
  border-top: none;
}

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

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

  .app-shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 20px;
  }

  .panel-heading,
  .inline-row,
  .results-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .pill {
    justify-content: center;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .brand-mark {
    width: 58px;
    height: 58px;
  }
}
