:root {
  --ink: #20383f;
  --muted: #60757b;
  --paper: #f4f8fa;
  --white: #fff;
  --line: #d8e4e8;
  --accent: #245b69;
  --soft: #e6f2f4;
  --peach: #fce9da;
  --danger: #a52f39;
  --green: #23634a;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 9px;
  font-weight: 600;
}
button:hover {
  background: var(--soft);
}
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
button.primary:hover {
  background: #174553;
}
button.text {
  background: none;
  border: 0;
  padding: 6px 2px;
  color: var(--accent);
}
button.danger {
  color: var(--danger);
}
a {
  color: var(--accent);
}
:focus-visible {
  outline: 3px solid #e3a54e;
  outline-offset: 3px;
}
input,
select,
textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #b8cbd1;
  border-radius: 7px;
  background: white;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 85px;
}
label {
  display: block;
  font-weight: 600;
  margin: 0 0 7px;
}
small,
.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.hint {
  margin: 6px 0 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  margin: 0 0 10px;
  line-height: 1.2;
}
h2 {
  font-size: 21px;
  margin: 0 0 18px;
  letter-spacing: -0.4px;
}
h3 {
  font-size: 16px;
  margin: 0 0 9px;
}
p {
  line-height: 1.6;
  margin: 0 0 14px;
}
header {
  background: white;
  border-bottom: 1px solid var(--line);
}
.top {
  max-width: 1360px;
  margin: auto;
  padding: 22px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 39px;
  height: 39px;
  border: 2px solid var(--accent);
  border-radius: 13px 13px 13px 2px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}
.brand b {
  font-size: 22px;
  letter-spacing: -0.8px;
}
.brand small {
  display: block;
}
.account {
  display: flex;
  gap: 15px;
  align-items: center;
}
.account small {
  display: block;
}
.nav {
  display: flex;
  gap: 26px;
  max-width: 1360px;
  margin: auto;
  padding: 0 36px;
  overflow: auto;
}
.nav button {
  white-space: nowrap;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 17px 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
}
.nav button.active {
  color: var(--accent);
  border-color: var(--accent);
}
main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 36px;
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}
.intro p {
  color: var(--muted);
  max-width: 670px;
}
.tag {
  display: inline-flex;
  padding: 5px 10px;
  background: var(--soft);
  color: var(--accent);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.tag.published {
  background: #e3f1e8;
  color: var(--green);
}
.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
  gap: 26px;
  align-items: start;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px;
}
.steps {
  padding: 0;
  overflow: visible;
}
.step {
  padding: 26px;
  border-bottom: 1px solid var(--line);
}
.step:last-child {
  border: 0;
}
.step-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.step-title h2 {
  margin: 0;
}
.number {
  background: var(--soft);
  color: var(--accent);
  height: 28px;
  width: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.field {
  margin-bottom: 18px;
}
.field-heading {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.field-action {
  flex: none;
  font-size: 13px;
  padding: 2px 0;
}
.fields .field {
  margin-bottom: 0;
}
.span2 {
  grid-column: 1/-1;
}
.preview {
  position: sticky;
  top: 24px;
}
.preview .panel {
  border-top: 5px solid var(--accent);
}
.preview-empty {
  padding: 25px 0;
  color: var(--muted);
}
.preview-url {
  background: var(--soft);
  padding: 15px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.7;
  margin: 18px 0;
}
.utm-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.utm-row:last-child {
  border: 0;
}
.utm-row b {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.utm-row small {
  display: block;
  margin-top: 4px;
}
.utm-row code {
  font-size: 11px;
  color: var(--muted);
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}
.actions.end {
  justify-content: flex-end;
}
.notice {
  border-left: 3px solid #d39139;
  background: #fff5e8;
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.6;
}
.error {
  color: var(--danger);
  background: #fff0f1;
  padding: 12px 14px;
  border-radius: 7px;
  margin: 12px 0;
  white-space: pre-line;
}
.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}
.empty h2 {
  color: var(--ink);
}
.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar input {
  flex: 1;
}
.toolbar select {
  width: 190px;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
th {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td small {
  display: block;
  max-width: 280px;
  overflow-wrap: anywhere;
  margin-top: 5px;
}
td .text {
  text-align: left;
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.tabs .active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.dictionary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dictionary-item {
  padding: 20px;
}
.dictionary-item p {
  font-size: 14px;
  color: var(--muted);
}
.dictionary-item code {
  font-size: 12px;
}
.dictionary-item .aliases {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.combobox {
  position: relative;
}
.suggestions {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 250px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: 0 8px 20px #20383f19;
}
.suggestions button {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
  padding: 12px;
  font-weight: 500;
}
.suggestions button small {
  display: block;
}
.suggestions button[aria-selected="true"] {
  background: var(--soft);
}
.selected-info {
  min-height: 18px;
}
.selected-info:empty {
  display: none;
}
.login {
  max-width: 460px;
  margin: 9vh auto;
  padding: 32px;
}
.login .brand {
  margin-bottom: 32px;
}
.login h1 {
  font-size: 27px;
}
.login button.primary {
  width: 100%;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  max-width: 680px;
  width: calc(100% - 32px);
  max-height: 88vh;
  color: var(--ink);
  box-shadow: 0 20px 80px #132e4140;
}
dialog::backdrop {
  background: #20383f73;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 20px;
}
.modal-head h2 {
  margin: 7px 0;
}
.modal-head button {
  padding: 6px 11px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  line-height: 1.5;
  margin: 15px 0;
}
.check input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.history {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.history small {
  display: block;
}
.history pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 11px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  border-radius: 9px;
  padding: 13px 22px;
  z-index: 100;
  display: none;
  max-width: 90vw;
}
.loading {
  padding: 60px;
  text-align: center;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.help-grid p {
  color: var(--muted);
}
.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.break {
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
}
.proposal {
  margin-bottom: 16px;
}
.proposal h3 {
  margin-top: 8px;
}
.mobile-only {
  display: none;
}
@media (max-width: 1000px) {
  .dictionary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .span2 {
    grid-column: auto;
  }
}
@media (max-width: 760px) {
  .top {
    padding: 16px 20px;
  }
  .nav {
    padding: 0 20px;
    gap: 22px;
  }
  .account small {
    display: none;
  }
  .account {
    gap: 8px;
  }
  .account b {
    font-size: 13px;
  }
  main {
    padding: 24px 16px;
  }
  h1 {
    font-size: 27px;
  }
  .intro {
    display: block;
  }
  .intro .tag {
    margin-top: 8px;
  }
  .grid,
  .help-grid {
    grid-template-columns: 1fr;
  }
  .preview {
    position: static;
  }
  .step,
  .panel {
    padding: 20px;
  }
  .steps {
    padding: 0;
  }
  .dictionary-grid {
    grid-template-columns: 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar select {
    width: 100%;
  }
  .login {
    margin: 30px 16px;
  }
  .table-wrap {
    margin: 0 -8px;
  }
  .hide-mobile {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
