:root {
  --bg: #f4efe6;
  --panel: rgba(255, 250, 244, 0.88);
  --card: #fffaf2;
  --ink: #1f2a2d;
  --muted: #6a726e;
  --line: rgba(31, 42, 45, 0.12);
  --accent: #0b6e4f;
  --accent-soft: #d8efe7;
  --danger: #9f2d2d;
  --danger-soft: #f6dede;
  --shadow: 0 18px 40px rgba(31, 42, 45, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(11, 110, 79, 0.18), transparent 30%),
    linear-gradient(135deg, #f6f1e7 0%, #e4efe8 100%);
  min-height: 100vh;
}

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

.hero {
  margin-bottom: 28px;
}

.hero-topline {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 0.94;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.nav-tabs a {
  text-decoration: none;
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.72);
  border: 1px solid var(--line);
  font-weight: 600;
}

.nav-tabs a.active {
  background: var(--accent);
  color: white;
}

.lede {
  margin: 16px 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.panel,
.feedback {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 24px;
}

.panel {
  padding: 26px;
  margin-bottom: 24px;
}

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

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

label span {
  font-size: 0.92rem;
}

input,
select,
button,
pre {
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 14px 16px;
  color: var(--ink);
}

.actions {
  display: flex;
  align-items: end;
}

.actions-full {
  grid-column: 1 / -1;
}

button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0b6e4f 0%, #0d8b61 100%);
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.04);
}

.meta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.meta div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meta span {
  color: var(--muted);
  word-break: break-word;
}

.feedback {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  margin-bottom: 24px;
}

.feedback.success {
  background: var(--accent-soft);
}

.feedback.error {
  background: var(--danger-soft);
  color: var(--danger);
}

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

.section-title {
  margin-bottom: 14px;
}

.section-title h2,
.section-title p {
  margin: 0;
}

.section-title p {
  margin-top: 8px;
  color: var(--muted);
}

pre {
  overflow-x: auto;
  padding: 18px;
  border-radius: 18px;
  background: #142026;
  color: #f7f4ee;
  line-height: 1.5;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

th {
  font-size: 0.9rem;
  color: var(--muted);
}

.status-chip {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-weight: 700;
}

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

.full-width {
  grid-column: 1 / -1;
}

textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 14px 16px;
  color: var(--ink);
  resize: vertical;
}

.checkbox-row {
  justify-content: end;
}

.checkbox-row input {
  width: 22px;
  height: 22px;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 20px;
}

.commodity-list {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 820px) {
  .grid,
  .meta,
  .split-panel,
  .hero-topline {
    grid-template-columns: 1fr;
  }

  .hero-topline {
    display: block;
  }

  .nav-tabs {
    margin-top: 16px;
    justify-content: flex-start;
  }

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

  .panel {
    padding: 20px;
  }
}
