:root {
  color-scheme: light;
  --bg: #eef2f6;
  --panel: #ffffff;
  --text: #17202a;
  --muted: #607086;
  --line: #d5dde8;
  --accent: #1967d2;
  --accent-hover: #1557b0;
  --soft: #e8f0fe;
  --danger: #b42318;
  --success: #137333;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 36%),
    var(--bg);
  color: var(--text);
}

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

.workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(33, 46, 70, 0.12);
  padding: 26px;
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

.counter {
  display: grid;
  min-width: 88px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  padding: 12px 16px;
  font-size: 13px;
  text-align: center;
}

.counter span:first-child {
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field span {
  color: #2c3b4f;
  font-size: 14px;
  font-weight: 700;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--text);
  font: inherit;
  outline: none;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background 120ms ease;
}

textarea {
  min-height: 380px;
  resize: vertical;
  padding: 14px;
  line-height: 1.45;
}

input {
  height: 46px;
  padding: 0 14px;
}

textarea:focus,
input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.14);
}

.archive-field,
.actions {
  align-self: end;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

button {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 18px;
  transition:
    background 120ms ease,
    transform 120ms ease,
    opacity 120ms ease;
}

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

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

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

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

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

.status {
  min-height: 24px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.status.error {
  color: var(--danger);
}

.status.success {
  color: var(--success);
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100vw - 20px, 680px);
    padding: 10px 0;
  }

  .workspace {
    padding: 18px;
  }

  .header,
  .form-grid,
  .actions {
    grid-template-columns: 1fr;
  }

  .header {
    display: grid;
  }

  .counter {
    width: 100%;
  }

  textarea {
    min-height: 250px;
  }

  .actions {
    display: grid;
  }

  button {
    width: 100%;
  }
}
