:root {
  color-scheme: light;
  --ink: #15191f;
  --muted: #5d6673;
  --line: #d8dde6;
  --paper: #f7f4ef;
  --panel: #ffffff;
  --green: #1d7f5f;
  --blue: #255f99;
  --red: #a43f42;
  --gold: #ba7a1b;
}

* {
  box-sizing: border-box;
}

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

button,
input,
textarea {
  font: inherit;
}

.option-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px);
  gap: 8px;
  margin-top: 14px;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1180px, calc(100vw - 32px));
  margin: 32px auto;
}

.workspace,
.output-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
}

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

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: 36px;
  line-height: 1.08;
}

h2 {
  font-size: 20px;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.generator {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
}

textarea {
  margin-top: 8px;
  resize: vertical;
}

summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

button,
.download {
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

.terminal-panel {
  overflow: hidden;
  border: 1px solid #1f2630;
  border-radius: 8px;
  background: #12161d;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  color: #e8edf5;
  border-bottom: 1px solid #2c3542;
  font-size: 14px;
  font-weight: 800;
}

.panel-top button {
  padding: 6px 10px;
  background: #2f3947;
}

.events {
  height: 430px;
  margin: 0;
  padding: 14px 18px 18px 34px;
  overflow: auto;
  color: #d9e2ee;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.events li {
  margin-bottom: 8px;
}

.events .type {
  color: #8fd0b4;
  font-weight: 800;
}

.events .error {
  color: #ffb1b5;
}

.output-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 520px;
}

.output-panel p,
.signal-grid span {
  color: var(--muted);
  line-height: 1.5;
}

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
}

.download.secondary {
  background: var(--blue);
}

.hidden {
  display: none;
}

.signal-grid {
  display: grid;
  gap: 10px;
  margin-top: auto;
}

.signal-grid div {
  border-left: 4px solid var(--gold);
  background: #fbfaf7;
  padding: 12px;
}

.signal-grid strong,
.signal-grid span {
  display: block;
}

/* Profile radio selector */
.profile-selector {
  border: 0;
  padding: 0;
  margin-top: 8px;
}

.profile-selector legend {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.radio-label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: start;
  margin-bottom: 8px;
  cursor: pointer;
}

.radio-label input {
  width: auto;
  margin-top: 3px;
}

.radio-label strong {
  display: block;
  font-size: 14px;
  color: var(--ink);
}

.radio-label .hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  grid-column: 2;
}

/* Summary panel in output area */
.summary-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.summary-stat {
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}

.summary-stat strong {
  display: block;
  font-size: 22px;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.2;
}

.summary-stat span {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    margin-block: 16px;
  }

  .brand-row,
  .input-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  h1 {
    font-size: 28px;
  }

  .events {
    height: 330px;
  }
}

/* Auth tab bar */
.auth-tabs {
  display: flex;
  gap: 2px;
  margin: 10px 0 6px;
}
.auth-tab {
  flex: 1;
  padding: 7px 4px;
  border: 1px solid var(--line);
  border-radius: 6px 6px 0 0;
  background: #f0f2f5;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.auth-tab.active {
  background: var(--panel);
  color: var(--ink);
  border-bottom-color: var(--panel);
}
.auth-panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  padding: 10px;
  margin-top: -1px;
}
.auth-panel.active {
  display: block;
}
.auth-panel label {
  margin-top: 0;
}
