:root {
  color-scheme: light;
  --bg: #f5f7f4;
  --panel: #ffffff;
  --ink: #152118;
  --muted: #637066;
  --line: #dce3d9;
  --accent: #245a38;
  --accent-2: #a54d2a;
  --soft: #eef4ec;
  --warning: #9b312e;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

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

h1 {
  font-size: 20px;
}

h2 {
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.05;
  max-width: 720px;
}

.status-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 22px;
  max-width: 1320px;
  margin: 0 auto;
}

.workspace {
  display: grid;
  gap: 18px;
}

.hero-band {
  min-height: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: center;
  padding: 34px;
  border-bottom: 1px solid var(--line);
}

.lead {
  color: var(--muted);
  max-width: 720px;
  font-size: 17px;
  line-height: 1.7;
}

.snapshot-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.snapshot-card {
  min-height: 210px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 14px;
  box-shadow: 0 14px 42px rgba(36, 90, 56, 0.08);
}

.snapshot-line {
  height: 12px;
  width: 72%;
  border-radius: 99px;
  background: var(--soft);
}

.snapshot-line.wide {
  width: 100%;
  background: #dbe8d7;
}

.snapshot-line.short {
  width: 46%;
}

.snapshot-watermark {
  color: var(--accent);
  background: var(--soft);
  border: 1px solid #cddfca;
  border-radius: 6px;
  padding: 10px;
  font-weight: 700;
}

.grid.two {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.panel {
  padding: 18px;
}

.panel.compact {
  margin-bottom: 18px;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 16px;
  font-weight: 800;
}

.panel-title small {
  color: var(--muted);
  font-weight: 500;
}

.form label,
.result label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.input-row {
  display: flex;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  border: 1px solid #bdc9b8;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 140px;
  padding: 12px;
  resize: vertical;
}

button,
.ghost-link {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.ghost-link {
  background: #fff;
  color: var(--accent);
  border: 1px solid #b8c9b3;
}

.message {
  color: var(--muted);
  line-height: 1.5;
}

.message.error {
  color: var(--warning);
  font-weight: 800;
}

.result {
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.result-head,
.button-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.button-row {
  justify-content: flex-start;
  margin-top: 12px;
}

.metrics {
  display: grid;
  gap: 10px;
  margin: 0;
}

.metrics div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

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

.metrics dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.notice {
  margin-top: 16px;
  background: #fff8ed;
  border: 1px solid #ead7b8;
  border-radius: 6px;
  padding: 12px;
  color: #6f522a;
  line-height: 1.5;
}

.table {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row.head {
  background: var(--soft);
  color: var(--muted);
  font-weight: 800;
}

.side {
  position: sticky;
  top: 88px;
  align-self: start;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.checklist li {
  padding-left: 22px;
  position: relative;
  line-height: 1.5;
}

.checklist li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 9px;
}

.token-list {
  display: grid;
  gap: 8px;
}

code {
  display: block;
  background: #f0f3ee;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  word-break: break-all;
}

@media (max-width: 980px) {
  .layout,
  .hero-band,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }
}

@media (max-width: 640px) {
  .topbar,
  .layout {
    padding: 14px;
  }

  .topbar,
  .input-row,
  .result-head,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-band {
    padding: 18px 0;
  }

  .row {
    grid-template-columns: 1fr;
  }
}
