:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #5d6880;
  --line: #dde4ef;
  --primary: #176b87;
  --primary-dark: #0f4f66;
  --accent: #d95f43;
  --soft: #e9f4f7;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 24px;
}

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

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

h1 {
  margin-bottom: 10px;
  font-size: 44px;
  line-height: 1.08;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.status {
  min-width: 120px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

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

.tool-panel {
  padding: 10px;
}

.tool {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
}

.tool:hover {
  background: #f0f5f8;
}

.tool.active {
  background: var(--soft);
  color: var(--primary-dark);
  font-weight: 700;
}

.tool.highlight {
  background: #fff7ed;
  color: #b45309;
  font-weight: 600;
}

.tool.highlight:hover {
  background: #ffedd5;
}

.tool.highlight.active {
  background: #fde68a;
  color: #92400e;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 8px 4px;
}

.footer {
  margin-top: 32px;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.footer p {
  margin: 4px 0;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.workspace {
  padding: 24px;
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 22px;
}

.workspace h2 {
  margin-bottom: 6px;
  font-size: 26px;
}

.workspace p {
  color: var(--muted);
  margin-bottom: 0;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 700;
}

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

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

textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.7;
}

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

.primary {
  width: fit-content;
  min-width: 140px;
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
}

.primary:disabled {
  cursor: wait;
  opacity: 0.65;
}

.result {
  margin-top: 20px;
  border: 1px solid #b6d7c9;
  border-radius: 8px;
  background: #effaf4;
  padding: 14px 16px;
}

.result.error {
  border-color: #e5b6aa;
  background: #fff1ed;
}

@media (max-width: 760px) {
  .hero {
    align-items: stretch;
    flex-direction: column;
  }

  h1 {
    font-size: 34px;
  }

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

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

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

  .primary {
    width: 100%;
  }
}

