:root {
  --ink: #17201b;
  --muted: #617067;
  --line: #d4ded6;
  --panel: #f8fbf4;
  --field: #ffffff;
  --accent: #2f7d55;
  --accent-strong: #1e593a;
  --warn: #b4572f;
  --shadow: 0 24px 80px rgba(35, 52, 42, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.16), transparent 34%),
    linear-gradient(315deg, rgba(180, 87, 47, 0.16), transparent 32%),
    #eef4ea;
}

button,
input,
select {
  font: inherit;
}

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

.workspace {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  min-height: calc(100vh - 64px);
}

[hidden] {
  display: none !important;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(248, 251, 244, 0.92);
  box-shadow: var(--shadow);
}

.controls {
  align-self: start;
  display: grid;
  gap: 24px;
  padding: 24px;
}

.auth-panel {
  display: grid;
  gap: 24px;
  width: min(430px, 100%);
  margin: min(18vh, 140px) auto 0;
  padding: 28px;
}

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

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
}

h2 {
  font-size: 26px;
}

.stack {
  display: grid;
  gap: 14px;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--field);
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(47, 125, 85, 0.16);
}

button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 13px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

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

.primary {
  border-color: var(--accent-strong);
  color: #fff;
  background: var(--accent);
}

.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.output-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

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

.output-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.state {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--warn);
  font-size: 13px;
  font-weight: 700;
}

pre {
  margin: 0;
  min-width: 0;
  overflow: auto;
  padding: 24px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 15px;
  line-height: 1.55;
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 640px);
    padding: 10px 0;
  }

  .workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  h1 {
    font-size: 30px;
  }
}
