:root {
  color-scheme: dark;
  --bg: #0c0f12;
  --panel: #14191f;
  --line: #293039;
  --text: #edf1f3;
  --muted: #98a3ae;
  --accent: #c8e6c0;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}
header {
  height: 82px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 25px;
  font-weight: 750;
  letter-spacing: 4px;
}
.brand span {
  font-size: 10px;
  letter-spacing: 2px;
  border-left: 1px solid #55606a;
  margin-left: 15px;
  padding-left: 18px;
  font-weight: 500;
}
main {
  max-width: 1400px;
  margin: auto;
  padding: 52px 5vw;
}
h1 {
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.14;
  font-weight: 500;
  letter-spacing: -1.8px;
  margin: 12px 0 18px;
}
h2 {
  font-size: 22px;
  line-height: 1.4;
  margin: 8px 0;
}
h3 {
  font-size: 15px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--accent);
  font-weight: 650;
  margin: 0;
}
.muted,
.footnote {
  color: var(--muted);
}
.footnote {
  font-size: 12px;
  margin-top: 28px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.login {
  max-width: 460px;
  padding: 38px;
  margin: 30px auto;
}
.login form {
  margin-top: 30px;
}
label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
input,
textarea,
select {
  font: inherit;
  background: #0d1116;
  color: var(--text);
  border: 1px solid #36414c;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  margin: 6px 0 18px;
}
textarea {
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
button {
  font: inherit;
  cursor: pointer;
  border: 1px solid #39454f;
  border-radius: 8px;
  padding: 9px 15px;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.15s;
}
button:hover {
  background: #27323b;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.primary {
  background: var(--accent);
  color: #142116;
  border-color: var(--accent);
  font-weight: 600;
  padding: 13px 20px;
}
.primary:hover {
  background: #b7d8ae;
}
.login .primary {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.quiet {
  border: 0;
  color: var(--muted);
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 35px;
}
.heading .muted {
  margin: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.source-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  margin-bottom: 10px;
}
.source-tabs [aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #142116;
}
.source-crawls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.source-crawls button {
  flex: 1 1 180px;
}
.article-url-form {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.article-url-form label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}
.article-url-form > div {
  display: flex;
  gap: 10px;
}
.article-url-form input {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.article-url-form button {
  white-space: nowrap;
}
.stat {
  padding: 20px 24px;
  background: var(--panel);
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat strong {
  display: block;
  font-size: 28px;
  font-weight: 500;
}
.stat span {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.service-status {
  font-size: 12px;
  color: var(--muted);
  min-height: 45px;
}
.warning {
  color: #efbc81;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 22px 0;
}
.toolbar input,
.toolbar select {
  margin: 0;
}
.search-label {
  flex: 1;
}
.toolbar #count {
  font-size: 12px;
  white-space: nowrap;
}
.articles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.story {
  display: grid;
  grid-template-columns: 135px 1fr auto;
  gap: 24px;
  padding: 20px;
  align-items: center;
}
.story img,
.image-placeholder {
  width: 135px;
  height: 95px;
  object-fit: cover;
  border-radius: 8px;
  background: #202830;
}
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #65727d;
  font-size: 11px;
}
.story h2 {
  font-size: 17px;
  letter-spacing: -0.2px;
  margin: 6px 0 10px;
}
.story h2 button {
  font: inherit;
  border: none;
  padding: 0;
  text-align: left;
  white-space: normal;
}
.story h2 button:hover {
  background: none;
  color: var(--accent);
}
.details {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.details a,
a {
  color: var(--accent);
}
.badge {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: #293640;
  color: #b6c8d5;
}
.badge.translated {
  background: #323123;
  color: #e0d4a0;
}
.badge.published {
  background: #22382b;
  color: #b5ddb9;
}
.actions {
  display: flex;
  gap: 7px;
}
.actions button {
  font-size: 12px;
  padding: 8px 12px;
}
.actions button:last-child {
  color: var(--accent);
  border-color: #4b6350;
}
.error {
  font-size: 12px;
  color: #f2ac9f;
  margin: 8px 0 0;
}
.empty {
  padding: 60px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}
#message {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90vw;
  width: max-content;
  background: #d8e8d4;
  color: #152116;
  border-radius: 9px;
  padding: 14px 22px;
  box-shadow: 0 12px 40px #0007;
  z-index: 10;
}
dialog {
  width: min(1150px, 95vw);
  max-height: 90vh;
  background: var(--panel);
  color: var(--text);
  border: 1px solid #47515b;
  border-radius: 16px;
  padding: 28px;
}
dialog::backdrop {
  background: #000b;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.editor-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.editor-columns section {
  min-width: 0;
}
pre {
  font:
    13px/1.9 Segoe UI,
    Arial,
    sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #bbc4cc;
  max-height: 65vh;
  overflow: auto;
}
#translation-body {
  font-size: 15px;
  line-height: 1.9;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
@media (max-width: 950px) {
  .story {
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
  .story img,
  .image-placeholder {
    width: 100px;
    height: 85px;
  }
  .actions {
    grid-column: 2;
  }
  .heading {
    align-items: flex-start;
  }
  .heading .primary {
    margin-top: 30px;
  }
}
@media (max-width: 600px) {
  main {
    padding-top: 30px;
  }
  .heading {
    flex-direction: column;
    gap: 4px;
  }
  .heading .primary {
    margin-top: 15px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat {
    border-bottom: 1px solid var(--line);
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .search-label {
    flex-basis: 100%;
  }
  .story {
    padding: 14px;
    gap: 12px;
  }
  .story h2 {
    font-size: 15px;
  }
  .actions {
    grid-column: 1/-1;
  }
  .actions button {
    flex: 1;
  }
  .editor-columns {
    grid-template-columns: 1fr;
  }
  .brand {
    font-size: 21px;
  }
  dialog {
    padding: 18px;
  }
  .login {
    padding: 26px;
  }
  .empty {
    padding: 35px 15px;
  }
}
