/* Каталог EdTech — направление «Указатель». */

:root {
  --ink: #1b1b1f;
  --ink-soft: #2c2c31;
  --muted: #6e6e73;
  --line: #e2e2e5;
  --accent: #2647e8;
  --paper: #ffffff;
  --panel: #f5f5f7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 "Piazzolla", Georgia, "Times New Roman", serif;
  -webkit-text-size-adjust: 100%;
}

.col {
  max-width: 660px;
  margin: 0 auto;
  padding: 44px 24px 80px;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

.ui, .top, .who, .meta, .cats, .score, .dist, .review .head,
.foot, label, .status, .seg, .chips, .btn, .hint, .empty, .logo-row {
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ------------------------------------------------------------------ шапка */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
  font-size: 14px;
}

.brand {
  font-family: "Piazzolla", Georgia, serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.who { font-size: 13px; color: var(--muted); }
.who a { color: var(--muted); }

/* ---------------------------------------------------------------- каталог */

input.search {
  width: 100%;
  font: 400 22px/1.3 "Piazzolla", Georgia, serif;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 8px 0 10px;
  margin-bottom: 20px;
}
input.search::placeholder { color: #9a9aa0; }
input.search:focus { outline: none; border-bottom-width: 2px; padding-bottom: 9px; }

.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  margin-bottom: 48px;
}
.cats a { color: var(--muted); text-decoration: none; }
.cats a:hover { color: var(--ink); }
.cats a.on {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.cats .n { color: #a6a6ab; }

.row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 24px;
  margin-bottom: 40px;
}

.row .name {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 6px;
}
.row .name a { color: var(--ink); text-decoration: none; }
.row .name a:hover { text-decoration: underline; text-underline-offset: 4px; }
.row .tagline { margin: 0 0 8px; color: var(--ink-soft); }
.meta { font-size: 13px; color: var(--muted); }

.score { text-align: right; }
.score .n { font-size: 24px; font-weight: 600; line-height: 1; white-space: nowrap; }
.score .n::before { content: "★ "; color: var(--accent); font-size: 16px; vertical-align: 3px; }
.score .c { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }
.score .none { font-size: 13px; color: var(--muted); }

.empty { color: var(--muted); font-size: 15px; margin: 40px 0; }

/* -------------------------------------------------------- страница компании */

h1 {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 0 0 10px;
}

.lead { font-size: 22px; line-height: 1.35; margin: 0 0 20px; }
p.body { font-size: 17px; line-height: 1.55; margin: 0 0 16px; color: var(--ink-soft); }

h2.sub {
  font-family: "Golos Text", sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin: 32px 0 10px;
}

ul.svc { margin: 0; padding-left: 18px; line-height: 1.6; }
.contacts { font-family: "Golos Text", sans-serif; font-size: 15px; line-height: 1.8; }

.rating {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: start;
  margin: 44px 0 12px;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}
.rating .big .n { font-family: "Golos Text", sans-serif; font-size: 48px; font-weight: 600; line-height: 1; }
.rating .big .n::before { content: "★ "; color: var(--accent); font-size: 28px; vertical-align: 6px; }
.rating .big .c { display: block; font-size: 13px; color: var(--muted); margin-top: 6px; }

.dist { font-size: 12px; color: var(--muted); }
.dist div { display: grid; grid-template-columns: 12px 1fr 24px; gap: 8px; align-items: center; margin-bottom: 4px; }
.dist i { display: block; height: 6px; background: #ececee; border-radius: 3px; overflow: hidden; }
.dist i b { display: block; height: 100%; background: var(--accent); }

.review { margin-top: 28px; }
.review .head {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.review .head b { color: var(--ink); font-weight: 500; }
.review .head .s { color: var(--accent); letter-spacing: 1px; }
.review p { margin: 0; line-height: 1.5; }

.panel {
  margin-top: 36px;
  padding: 22px 24px;
  background: var(--panel);
  border-radius: 8px;
  font-family: "Golos Text", sans-serif;
}
.panel .t { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.panel p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.5; }

.stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; margin-bottom: 12px; }
.stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.stars label {
  font-size: 28px;
  line-height: 1;
  color: #c9ccd1;
  cursor: pointer;
  margin: 0;
  transition: color .1s;
}
.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label { color: var(--accent); }
.stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

textarea,
input[type="text"]:not(.in):not(.search),
input[type="url"]:not(.in):not(.search) {
  width: 100%;
  font: 400 16px/1.45 "Piazzolla", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c9ccd1;
  border-radius: 6px;
  padding: 10px 12px;
}
textarea { resize: vertical; min-height: 72px; }
textarea:focus, input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.btn {
  display: inline-block;
  margin-top: 10px;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn.ghost { background: transparent; color: var(--ink); border-color: #c9ccd1; margin-left: 8px; }

/* ------------------------------------------------------------------- форма */

.status {
  font-size: 13px;
  padding: 10px 14px;
  background: #fff6da;
  color: #5c4a00;
  border-radius: 6px;
  margin-bottom: 28px;
  line-height: 1.45;
}
.status.ok { background: #e6f4ec; color: #0f5132; }
.status.bad { background: #fdeaea; color: #7a1c1c; }

label { display: block; font-size: 13px; color: var(--muted); margin: 20px 0 6px; }
label small { color: #9a9aa0; margin-left: 6px; }

input.in {
  width: 100%;
  font: 400 18px/1.4 "Piazzolla", Georgia, serif;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #c9ccd1;
  padding: 6px 0 8px;
}
input.in:focus { outline: none; border-bottom: 2px solid var(--accent); padding-bottom: 7px; }

.seg { display: inline-flex; font-size: 14px; border: 1px solid #c9ccd1; border-radius: 6px; overflow: hidden; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: block; padding: 7px 14px; cursor: pointer; color: var(--ink); }
.seg input:checked + span { background: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.chips label { margin: 0; }
.chips input { position: absolute; opacity: 0; width: 0; height: 0; }
.chips span { display: block; padding: 6px 12px; border: 1px solid #c9ccd1; border-radius: 999px; cursor: pointer; color: var(--ink); }
.chips input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.logo-row { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); }
.logo-row img, .logo-row .box { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.logo-row .box { background: #f0f0f2; border: 1px dashed #c9ccd1; }

.actions { margin-top: 36px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.5; }

.foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ мобилка */

@media (max-width: 600px) {
  .col { padding: 28px 20px 56px; }
  h1 { font-size: 30px; }
  .lead { font-size: 19px; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .score { text-align: left; }
  .score .n { font-size: 18px; }
  .score .n::before { font-size: 13px; vertical-align: 2px; }
  .score .c { display: inline; margin-left: 8px; }
  .rating { grid-template-columns: 1fr; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
