:root {
  --brand: #a71916;
  --brand-2: #7f1210;
  --gold: #c08a3e;
  --bg: #fbf6f0;
  --paper: #ffffff;
  --soft: #f5ebe0;
  --line: #e7d8c7;
  --ink: #2a1a14;
  --muted: #7b665a;
  --ok: #2f6b3a;
  --ok-bg: #e6f2e4;
  --bad: #a2261b;
  --bad-bg: #fbe6e2;
  --warn: #b26a00;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(60, 25, 10, .06), 0 6px 24px rgba(60, 25, 10, .06);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--brand-2); }
a:hover { color: var(--brand); }
h1, h2, h3 { font-family: var(--serif); color: var(--brand); line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h2 { font-size: 1.35rem; margin-top: 1.4em; }
h3 { font-size: 1.1rem; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main.wrap { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }

/* шапка */
.top { background: var(--brand); color: #fff; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand { gap: 14px; }
.brand__logo { height: 54px; width: auto; display: block; }
.brand__text { font-size: .82rem; line-height: 1.25; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: #f7f1e7; border-left: 1px solid rgba(247, 241, 231, .35); padding-left: 14px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nav a, .linkbtn { color: #fff; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-size: .92rem; opacity: .85; }
.nav a:hover, .nav a.on { opacity: 1; background: rgba(255, 255, 255, .14); }
.linkbtn { background: none; border: 0; cursor: pointer; font: inherit; font-size: .92rem; }
.inline { display: inline; }

.foot { color: var(--muted); font-size: .85rem; padding-top: 24px; padding-bottom: 32px; border-top: 1px solid var(--line); }

/* блоки */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin-bottom: 20px; }
.card--soft { background: var(--soft); box-shadow: none; }
.narrow { max-width: 680px; margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > .card { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--gold); font-weight: 600; margin: 0 0 .5em; }
.lead { font-size: 1.12rem; max-width: 760px; }
.big { font-size: 1.6rem; font-family: var(--serif); color: var(--brand); margin: .2em 0; }
.big .muted { font-size: .95rem; font-family: var(--font); }
.prose p { margin: 0 0 1em; }

.hero { padding: 0 0 8px; }
.hero__banner { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 28px; }
.hero__text { max-width: 820px; }
@media (min-width: 1000px) {
  .hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 36px; align-items: center; padding-top: 8px; }
  .hero__banner { margin-bottom: 0; }
  .hero__text h1 { font-size: 2rem; }
  .hero__text .lead { font-size: 1.02rem; }
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0; }
.steps div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.steps b { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--serif); }
.hello { margin-bottom: 8px; }

.stage { margin-top: 28px; }
.stage__head p { margin: 0 0 12px; color: var(--muted); }
.noms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.nom { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.nom h3 { margin: 0; }
.nom p { margin: 0; }
.nom__vol { color: var(--brand-2); font-weight: 600; font-size: .9rem; }
.nom--mine { border-color: var(--gold); box-shadow: inset 4px 0 0 var(--gold); }
.nom .btn { align-self: flex-start; margin-top: auto; }
.nom__work { margin-top: 6px !important; }

/* кнопки */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 2px solid var(--brand); border-radius: 10px; padding: 11px 20px; font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: background .15s; }
.btn:hover { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn--ghost:hover { color: var(--brand); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--soft); color: var(--brand); border-color: var(--brand); }
.btn--danger { background: var(--bad); border-color: var(--bad); }
.btn--small { padding: 6px 12px; font-size: .88rem; border-radius: 8px; }
.btn--wide { width: 100%; margin-top: 8px; }
.btnrow { display: flex; gap: 6px; flex-wrap: wrap; }

/* формы */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field__label { font-weight: 600; font-size: .93rem; }
.field__label i, .check i { color: var(--bad); font-style: normal; }
.field__hint { color: var(--muted); font-size: .82rem; }
.field__err { color: var(--bad); font-size: .85rem; }
input[type=text], input[type=email], input[type=tel], input[type=url], input[type=search], input[type=password], input[type=number], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #d6c3b0; border-radius: 9px; padding: 10px 12px;
}
textarea { resize: vertical; }
input.short { width: 90px; }
.field--bad input, .field--bad select, .field--bad textarea { border-color: var(--bad); background: #fffafa; }
.other { margin-top: 6px; display: none; }
.other.show { display: block; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .93rem; cursor: pointer; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.check.field--bad span { color: var(--bad); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--brand-2); padding: 4px 0; }
.coauthor { border: 1px dashed var(--line); border-radius: 10px; padding: 8px 14px; }
.coauthor[open] { padding-bottom: 14px; }
.coauthor .field { margin-top: 10px; }
input.copy { font-size: .8rem; padding: 6px 8px; min-width: 220px; background: var(--soft); cursor: copy; }

/* оценка */
.score { border: 0; padding: 0; margin: 0; }
.score__label { font-weight: 600; font-size: .93rem; margin-bottom: 6px; padding: 0; }
.score__row { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pill span { display: block; text-align: center; padding: 8px 0; border: 1px solid #d6c3b0; border-radius: 8px; background: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.pill input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 1px; }
.score__total { margin: 4px 0 0; }
.score--off { opacity: .4; pointer-events: none; }

/* статусы, заметки */
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); vertical-align: middle; font-family: var(--font); }
.badge--submitted { background: #eef0f7; color: #3b4a7a; }
.badge--rework { background: #fff1d9; color: var(--warn); }
.badge--admitted { background: var(--ok-bg); color: var(--ok); }
.badge--rejected { background: var(--bad-bg); color: var(--bad); }
.note { padding: 12px 16px; border-radius: 10px; background: var(--soft); margin: 0 0 16px; }
.note--ok { background: var(--ok-bg); color: var(--ok); }
.note--error { background: var(--bad-bg); color: var(--bad); }
.warn { color: var(--warn); font-weight: 700; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--gold); }

.facts { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; margin: 16px 0; }
.facts dt { color: var(--muted); font-size: .9rem; }
.facts dd { margin: 0; white-space: pre-line; }

.worklist { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 6px; }
.worklist a { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; color: var(--ink); }
.worklist a:hover { border-color: var(--gold); }
.worklist__num { color: var(--muted); font-size: .85rem; flex: none; width: 52px; }
.worklist__title { flex: 1; }
.group { margin-top: 18px; }

/* дашборд */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-decoration: none; color: var(--ink); }
.tile b { display: block; font: 700 2rem var(--serif); color: var(--brand); }
.tile--bad b { color: var(--bad); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters select, .filters input[type=search] { width: auto; min-width: 200px; }
.tbl-wrap { overflow-x: auto; margin-bottom: 16px; }
.tbl { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .93rem; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--soft); color: var(--brand); font-weight: 600; font-size: .85rem; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.win td { background: #fff7e8; }
.tbl tr.muted td { color: var(--muted); }
.tbl__sum td { font-weight: 700; background: var(--soft); }
.w50 { width: 50%; }
.ext { text-decoration: none; }
aside.card form { margin-bottom: 8px; }
aside.card textarea, aside.card input[name=confirm] { margin-bottom: 8px; }

/* положение о конкурсе */
.doc { max-width: 780px; margin-left: auto; margin-right: auto; }
.doc h1 { font-size: clamp(1.4rem, 3.2vw, 2rem); }
.doc-edition { color: var(--muted); font-size: .9rem; margin: -.2em 0 1.2em; }
.doc-toc { background: var(--soft); border-radius: 10px; padding: 14px 18px; margin-bottom: 8px; }
.doc-toc__title { font-weight: 600; margin: 0 0 .4em; }
.doc-toc ol { margin: 0; padding-left: 1.4em; }
.doc-toc li { margin: .25em 0; }
.doc-sec h2 { font-size: 1.2rem; margin-top: 1.6em; }
.doc-head { font-weight: 600; margin: 1em 0 .5em; }
.cl { margin: 0 0 .8em; }
.cl__n { font-weight: 600; color: var(--brand); white-space: nowrap; }
.cl--sub1 { padding-left: 1.4em; }
.cl:target { background: #fff3cf; border-radius: 6px; box-shadow: 0 0 0 6px #fff3cf; }
.doc-up { font-size: .86rem; margin: .2em 0 0; }
.doc-foot { margin: 1.6em 0 0; }
.doc a { overflow-wrap: anywhere; }
.hero__rules { margin: 14px 0 0; }
.hero__help { margin: 6px 0 0; font-size: .95rem; }

/* вопросы и помощь */
.help { margin-top: 32px; }
.help h2 { margin-top: 0; }
.help__list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.help__list li { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.help__label { min-width: 72px; color: var(--muted); font-size: .9rem; }
.help__list a { font-weight: 600; overflow-wrap: anywhere; }
.help--inline { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.help--inline .help__list { margin-bottom: 0; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .card { padding: 18px; }
  .cl--sub1 { padding-left: .8em; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .score__row { grid-template-columns: repeat(6, 1fr); }
  .filters select, .filters input[type=search] { min-width: 0; width: 100%; }
}

/* длинные варианты в select не должны растягивать форму на телефоне */
select { max-width: 100%; text-overflow: ellipsis; }
.field, .form, .card, .split > * { min-width: 0; }
.card > h2:first-child, .card > h1:first-child { margin-top: 0; }
.form > .btn:not(.btn--wide) { align-self: flex-start; }
