:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
  background: #f5f7f4;
  color: #1f2923;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(135deg, rgba(46, 125, 93, 0.1), rgba(225, 238, 217, 0) 46%),
    #f5f7f4;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 18px;
  display: flex;
  align-items: center;
}

.tool {
  width: 100%;
  padding: 28px;
  border: 1px solid #d8e1d8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(35, 55, 43, 0.12);
}

.heading {
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #3d7255;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 7vw, 52px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hint {
  max-width: 54ch;
  margin: 14px 0 0;
  color: #647269;
  line-height: 1.65;
}

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

.field {
  display: grid;
  gap: 8px;
  color: #334238;
  font-weight: 700;
}

input[type="password"],
textarea {
  width: 100%;
  border: 1px solid #cbd8cf;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2923;
  outline: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease;
}

input[type="password"] {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  min-height: 136px;
  resize: vertical;
  padding: 12px 13px;
  line-height: 1.55;
}

input[type="password"]:focus,
textarea:focus {
  border-color: #2f7d5d;
  box-shadow: 0 0 0 3px rgba(47, 125, 93, 0.18);
}

.remember {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #536359;
  font-size: 14px;
}

.remember input {
  width: 18px;
  height: 18px;
  accent-color: #2f7d5d;
}

.intent-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.intent-group legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  color: #334238;
  font-weight: 700;
}

.intent-option {
  min-width: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid #d5ded7;
  border-radius: 8px;
  cursor: pointer;
}

.intent-option:has(input:checked) {
  border-color: #2f7d5d;
  background: #edf7f0;
}

.intent-option input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: #2f7d5d;
}

.intent-option span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.intent-option strong,
.intent-option small {
  overflow-wrap: anywhere;
}

.intent-option small {
  color: #66746b;
}

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 4px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 120ms ease,
    opacity 120ms ease,
    background-color 120ms ease;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.primary {
  background: #2f7d5d;
  color: #ffffff;
}

.primary:hover:not(:disabled) {
  background: #286c50;
}

.secondary {
  background: #e8eee9;
  color: #24352b;
}

.secondary:hover:not(:disabled) {
  background: #dce6df;
}

.status {
  min-height: 24px;
  margin: 18px 0 0;
  color: #536359;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.status.success {
  color: #236146;
}

.status.error {
  color: #a33b2d;
}

.display-status {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #d8e1d8;
}

.board-history {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #d8e1d8;
}

.display-status-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.compact {
  min-height: 40px;
  padding: 0 14px;
}

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

.status-grid div {
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e1d8;
  border-radius: 8px;
  background: #fbfcfb;
}

.status-grid dt {
  margin: 0 0 6px;
  color: #647269;
  font-size: 13px;
  font-weight: 700;
}

.status-grid dd {
  margin: 0;
  color: #24352b;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.status-detail {
  margin: 14px 0 0;
  color: #647269;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.history-state {
  margin: 14px 0 0;
  color: #647269;
  line-height: 1.55;
}

.history-state.error {
  color: #a33b2d;
}

.history-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.history-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8e1d8;
  border-radius: 8px;
  background: #fbfcfb;
}

.history-item.current {
  border-color: #2f7d5d;
  background: #edf7f0;
}

.history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #647269;
  font-size: 13px;
  font-weight: 700;
}

.history-current {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 8px;
  background: #2f7d5d;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.2;
}

.history-text {
  margin: 0;
  color: #24352b;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .shell {
    align-items: flex-start;
    padding: 16px;
  }

  .tool {
    padding: 20px;
  }

  .intent-group,
  .actions,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .display-status-header {
    align-items: stretch;
    flex-direction: column;
  }
}
