@import url("https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600;700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --bg: #f3efe6;
  --paper: #ffffff;
  --ink: #1b1b1b;
  --muted: #5a5a5a;
  --line: #d8dbe2;
  --field: #ffffff;
  --accent: #2d7ff9;
  --accent-ink: #ffffff;
  --danger: #c03b2b;
  --ok: #2e7d32;
  --shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 10% 0%, #f9f7f1 0%, rgba(249, 247, 241, 0) 60%),
    radial-gradient(900px 500px at 90% 10%, #efe7d9 0%, rgba(239, 231, 217, 0) 55%),
    var(--bg);
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  letter-spacing: 0.1px;
}

.site-banner {
  background:
    linear-gradient(180deg, rgba(27, 27, 27, 0.04), rgba(27, 27, 27, 0)),
    linear-gradient(90deg, #f0eadf 0%, #f6f1e8 55%, #ece2d3 100%);
  border-bottom: 1px solid rgba(27, 27, 27, 0.08);
  position: relative;
}

.site-banner::before {
  content: "";
  display: block;
  height: 7px;
  background: linear-gradient(90deg, #6f1216 0%, #b01f24 45%, #d6b08a 100%);
}

.site-banner__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: inherit;
  text-decoration: none;
}

.site-brand__logo {
  width: 72px;
  height: auto;
  flex: 0 0 auto;
}

.site-brand__text {
  display: grid;
  gap: 0.15rem;
}

.site-brand__name {
  font-family: "Crimson Pro", "Times New Roman", serif;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-brand__tag {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-banner__meta {
  display: grid;
  gap: 0.2rem;
  text-align: right;
}

.site-banner__eyebrow,
.page-intro__eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-banner__title {
  font-family: "Crimson Pro", "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.container {
  max-width: 980px;
  margin: 2.2rem auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.6rem 1.8rem 2rem;
  box-shadow: var(--shadow);
}

h1, h2 {
  margin: 0 0 1rem;
  font-family: "Crimson Pro", "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.4px;
}

h1 {
  font-size: 2.1rem;
}

h2 {
  font-size: 1.35rem;
  color: var(--ink);
}

.page-intro {
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.page-intro__body {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.paper-form {
  display: grid;
  gap: 0.95rem;
}

.paper-form > label,
.keyword-field > label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.abstract-field {
  display: grid;
  gap: 0.35rem;
}

.abstract-field__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.abstract-field__header label {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.abstract-field__count {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.abstract-field__count.is-over {
  color: var(--danger);
}

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

input, textarea, select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  background: var(--field);
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease, background 120ms ease;
  width: 100%;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 127, 249, 0.15);
  background: #ffffff;
}

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

.keyword-field {
  display: grid;
  gap: 0.35rem;
}

.keyword-field__box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--field);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: text;
}

.keyword-field__box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(45, 127, 249, 0.15);
}

.keyword-field__chips {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.keyword-field__input {
  border: 0;
  box-shadow: none;
  min-width: 180px;
  flex: 1 1 180px;
  padding: 0.3rem 0.2rem;
  background: transparent;
}

.keyword-field__input:focus {
  box-shadow: none;
}

.keyword-field__hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.55rem;
  border: 1px solid #bfd4fb;
  border-radius: 999px;
  background: #edf4ff;
  color: #2159b6;
  font-size: 0.82rem;
  font-weight: 600;
}

.keyword-chip:hover {
  background: #e3eeff;
}

.confirmation-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  text-transform: none;
  letter-spacing: normal;
}

.confirmation-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
  box-shadow: none;
}

.confirmation-field span {
  text-transform: none;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink);
}

button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.62rem 0.95rem;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow: none;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

button:hover {
  background: #1f6fe5;
}

button.secondary {
  background: #f4f5f7;
  color: #243041;
  border-color: #d8dbe2;
  box-shadow: none;
}

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

button.danger {
  background: #ffffff;
  color: var(--danger);
  border-color: #e2c5c0;
  box-shadow: none;
}

button.danger:hover {
  background: #fbf4f3;
}

.authors-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-top: 1rem;
}

.authors-header > h2 {
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

#authors-container {
  margin-bottom: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 0.75rem;
}

.author-row {
  padding: 0.1rem;
  border-radius: 10px;
  background: #ffffff;
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.author-row > label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.alert {
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--line);
}

.alert.error {
  background: #f8e7e7;
  color: #6f1b1e;
}

.alert.success {
  background: #e9f4ec;
  color: #1f5c2f;
}

@media (max-width: 880px) {
  .site-banner__inner {
    padding: 1rem 1rem 1.15rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-banner__meta {
    text-align: left;
  }

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

  .confirmation-field {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .abstract-field__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .keyword-field__input {
    min-width: 100%;
  }

  .container {
    margin: 1.5rem;
    padding: 1.25rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  .site-brand {
    align-items: flex-start;
  }

  .site-brand__logo {
    width: 60px;
  }

  .site-brand__name {
    font-size: 1.35rem;
  }
}
