:root {
  --ink: #0b1033; --ink2: #151b4a; --violet: #7b4cff; --cyan: #14c8f5; --lav: #cfcaff;
  --bg: #f5f4fd; --card: #ffffff; --line: #e3e1f5; --muted: #5d6188; --text: #0b1033;
  --green: #1aa37a; --red: #e0525b; --amber: #e8971f;
  --green-bg: #e6f7f1; --red-bg: #fdeced; --amber-bg: #fdf3e2;
  font-family: "Readex Pro", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.7; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; border-radius: 12px; padding: .55em 1.1em; font-weight: 500; }
button:disabled { opacity: .45; cursor: default; }
.btn { background: var(--violet); color: #fff; display: inline-block; text-decoration: none;
  border-radius: 12px; padding: .55em 1.1em; font-weight: 500; }
.btn.ghost { background: transparent; color: var(--violet); border: 1.5px solid var(--lav); }
.btn.green { background: var(--green); } .btn.red { background: var(--red); }
.btn.amber { background: var(--amber); }
.btn.small { padding: .3em .8em; font-size: 13px; border-radius: 9px; }
input, select, textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: .5em .75em; background: #fff; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lav); border-color: var(--violet); }
label { display: block; font-size: 13px; color: var(--muted); margin: .7em 0 .2em; }
.hidden { display: none !important; }
header.top { background: var(--ink); color: #fff; display: flex; align-items: center; gap: 12px;
  padding: 10px 18px; position: sticky; top: 0; z-index: 5; }
header.top img { height: 28px; }
header.top .brand { font-weight: 600; font-size: 17px; }
header.top .brand small { color: var(--lav); font-weight: 300; font-size: 12px; margin-inline-start: 6px; }
header.top .who { margin-inline-start: auto; font-size: 13px; color: var(--lav); }
header.top button { background: rgba(255,255,255,.1); color: #fff; padding: .3em .8em; font-size: 13px; }
nav.tabs { display: flex; gap: 6px; padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; }
nav.tabs button { background: transparent; color: var(--muted); white-space: nowrap; }
nav.tabs button.on { background: var(--ink); color: #fff; }
main { max-width: 1100px; margin: 0 auto; padding: 18px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px;
  margin-bottom: 14px; box-shadow: 0 2px 10px rgba(11,16,51,.04); }
.login { max-width: 380px; margin: 9vh auto; text-align: center; }
.login .card { text-align: start; }
.login img { height: 64px; margin-bottom: 8px; }
.login h1 { font-size: 22px; margin: 0 0 4px; }
.err { color: var(--red); font-size: 13px; min-height: 1.4em; }
.ok { color: var(--green); font-size: 13px; }
.muted { color: var(--muted); font-size: 13px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; color: var(--muted); align-items: center; }
.crumbs span:not(:last-child)::after { content: "‹"; margin-inline-start: 6px; color: var(--lav); }
.crumbs span:last-child { color: var(--ink); font-weight: 600; }
.chip { display: inline-block; font-size: 12px; padding: 1px 10px; border-radius: 99px; background: var(--lav);
  color: var(--ink); font-weight: 500; }
.chip.green { background: var(--green-bg); color: var(--green); }
.chip.red { background: var(--red-bg); color: var(--red); }
.chip.amber { background: var(--amber-bg); color: #a2620a; }
.chip.ink { background: var(--ink); color: #fff; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 8px 0 4px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--cyan)); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.item h3 { margin: .3em 0 .4em; font-size: 18px; }
.field { margin: .5em 0; }
.field b { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.opt { border: 1.5px solid var(--line); border-radius: 10px; padding: .25em .8em; background: #fff; }
.opt.right { border-color: var(--green); background: var(--green-bg); }
.pairs div, .groups div { margin: 2px 0; }
.ltr { direction: ltr; text-align: left; unicode-bidi: plaintext; }
.decide { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.decide button { flex: 1 1 120px; padding: .8em; font-size: 16px; }
mark { background: #ffe98a; border-radius: 4px; padding: 0 2px; }
del { color: var(--red); }
.version { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.version.edited { border-color: var(--amber); }
.version h4 { margin: 0 0 4px; font-size: 13px; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: start; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg); font-weight: 500; color: var(--muted); }
.tablewrap { overflow-x: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stat b { display: block; font-size: 26px; color: var(--violet); line-height: 1.2; }
.stat span { font-size: 12px; color: var(--muted); }
.chart { width: 100%; height: auto; }
.chart text { font-family: "Readex Pro", sans-serif; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; }
.edit-list .line { display: flex; gap: 6px; margin-bottom: 6px; }
.edit-list .line input { flex: 1; }
.edit-list .line button { padding: .2em .6em; background: var(--red-bg); color: var(--red); }
h2 { font-size: 20px; margin: .2em 0 .6em; }
audio { height: 34px; max-width: 100%; }
