:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --panel: #ffffff;
  --ink: #202124;
  --muted: #626a73;
  --line: #d8d6cc;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --accent-soft: #dff1ee;
  --warning: #9a3412;
  --soft: #e8f3f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
  overflow-x: hidden;
}

html,
body {
  max-width: 100%;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 34px clamp(18px, 4vw, 56px) 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #f5f4ef 100%);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 42px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

.subtitle {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.entry-params {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 8px;
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  box-shadow: 0 1px 0 rgb(32 33 36 / 4%);
}

.entry-params strong {
  color: var(--accent-dark);
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
  gap: 16px;
  padding: 20px clamp(18px, 4vw, 56px) 40px;
}

.flow-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.flow-strip div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.flow-strip span {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.flow-strip strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.flow-strip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.form-panel {
  border-top: 4px solid var(--accent);
}

.output-panel {
  border-top: 4px solid #334155;
}

.wide-panel,
.boundary-card {
  grid-column: 1 / -1;
}

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

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

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

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

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

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-row input {
  width: auto;
}

.actions,
.prompt-title {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

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

button:hover {
  background: var(--accent-dark);
}

button.secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

button.secondary:hover {
  background: #f0f0ea;
}

.output-panel {
  display: grid;
  gap: 18px;
}

.output-panel > div:first-child {
  min-height: 250px;
  border-radius: 8px;
  padding: 16px;
  background: #f8faf9;
}

.output-panel ul {
  padding-left: 22px;
}

.boundary {
  color: var(--warning);
  font-weight: 700;
}

.prompt-box textarea {
  min-height: 230px;
  margin-top: 8px;
}

.status {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--accent-dark);
  font-size: 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.summary-grid div {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfbf8;
}

.summary-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.summary-grid strong {
  display: block;
  line-height: 1.45;
}

.record-item {
  display: block;
  width: 100%;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
  padding: 12px 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.record-item:first-child {
  border-top: 0;
}

.record-item:hover {
  background: #f7faf9;
}

.record-item div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.record-item p {
  margin: 6px 0 0;
  color: var(--muted);
}

.record-detail {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #f8faf9;
}

.record-detail h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.record-detail dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.record-detail dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

.record-detail dt {
  color: var(--muted);
  font-weight: 700;
}

.record-detail dd {
  margin: 0;
  line-height: 1.55;
}

.boundary-card {
  border-color: #f0b28b;
  background: #fff7ed;
}

@media (max-width: 860px) {
  .topbar,
  .layout {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    padding: 28px 18px 20px;
  }

  .panel,
  .boundary-card,
  .entry-params {
    margin-top: 16px;
    max-width: 100%;
  }

  .topbar > div {
    max-width: calc(100vw - 36px);
  }

  .two-col,
  .flow-strip,
  .record-detail dl div,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 34px;
  }

  .subtitle {
    max-width: 100%;
    font-size: 15px;
  }
}
