:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #182026;
  --muted: #65717b;
  --line: #d8dee4;
  --accent: #176b87;
  --accent-strong: #0f4c5c;
  --warn-bg: #fff7df;
  --warn-text: #6e5200;
  --danger: #9b2c2c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 14px;
}

nav a,
.back-link {
  color: var(--accent-strong);
  text-decoration: none;
}

.page {
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.narrow {
  max-width: 880px;
}

.wide {
  max-width: 1320px;
}

h1 {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
}

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

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 14px;
}

legend {
  padding: 0 6px;
  font-weight: 700;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  line-height: 1.35;
}

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

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #bdc7cf;
  border-radius: 6px;
  padding: 10px 11px;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 14px;
}

button.secondary {
  background: #e8edf1;
  color: var(--text);
}

button.danger {
  background: var(--danger);
}

.hidden {
  display: none !important;
}

.result {
  margin-top: 18px;
}

.result a {
  overflow-wrap: anywhere;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

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

.notice {
  margin: 0 0 14px;
  color: var(--warn-text);
}

.notice:not(:empty) {
  background: var(--warn-bg);
  border: 1px solid #edd28a;
  border-radius: 8px;
  padding: 12px 14px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
}

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f9fafb;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  margin-top: 14px;
}

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

.fact {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.actions {
  display: grid;
  gap: 10px;
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.preview {
  white-space: pre-wrap;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.pipeline-block {
  display: grid;
  gap: 12px;
}

.pipeline-block + .pipeline-block {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

@media (max-width: 820px) {
  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .two,
  .inline-form,
  .review-grid,
  .facts {
    grid-template-columns: 1fr;
  }
}
