@import url("../history/styles.css");

/* Витрина живёт на тех же токенах и в том же ритме, что дневник: шапка,
   подвал, карточки и заголовки — оттуда. Здесь только то, чего у дневника
   нет: итоги, карта по дням, сетка проектов и лента с чипами проектов. */

.hero-compact { min-height: auto; padding: 72px 0 40px; }
.sobrano { margin: 18px 0 0; color: #8b9294; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }

.metriki { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 24px; }
.metrika { padding: 22px 24px; border: 1px solid #d9d8d2; border-radius: 18px; background: #fff; }
.metrika-label { margin: 0 0 8px; color: #6d6e69; font-size: 12px; }
.metrika-value { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 3.4vw, 44px); font-weight: 400; letter-spacing: -.03em; line-height: 1; }
.metrika-value small { margin-left: 6px; font-family: Inter, ui-sans-serif, sans-serif; font-size: 12px; color: #8b9294; letter-spacing: 0; }

.legenda { display: flex; align-items: center; gap: 4px; color: #777873; font-size: 11px; }
.legenda span { margin: 0 4px; }
.kletka { display: block; width: 12px; height: 12px; border-radius: 3px; background: #efeee9; }
.kletka.u1 { background: #bfe3f5; }
.kletka.u2 { background: #7cc4ea; }
.kletka.u3 { background: #2d90cc; }
.kletka.u4 { background: #1a5f8f; }
.karta { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 14px); grid-auto-columns: 14px; gap: 4px; margin-top: 34px; overflow-x: auto; padding-bottom: 4px; }
.karta .kletka { width: 14px; height: 14px; }
.karta .kletka.segodnya { outline: 2px solid #171817; outline-offset: 1px; }
.karta-podpisi { display: flex; justify-content: space-between; margin-top: 10px; color: #8b9294; font-size: 11px; }

.proekty-section { margin-top: 90px; }
.proekty { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.proekt { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 20px; border: 1px solid #dcddd9; border-radius: 22px; background: #fff; box-shadow: 0 10px 34px rgba(36, 44, 49, .06); }
.proekt-shapka { display: flex; align-items: center; gap: 12px; }
.monogramma { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #171817; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 16px; letter-spacing: -.02em; }
.proekt[data-etap="research"] .monogramma { background: #b85f2b; }
.proekt[data-etap="repository"] .monogramma { background: #4b6b7c; }
.proekt[data-etap="zakryt"] .monogramma { background: #9a9aa0; }
.proekt h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
.etap { margin: 2px 0 0; color: #257fb6; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.proekt[data-etap="research"] .etap { color: #b85f2b; }
.proekt[data-etap="repository"] .etap { color: #4b6b7c; }
.proekt[data-etap="zakryt"] .etap { color: #8b9294; }
.proekt-opisanie { margin: 0; font-size: 14px; line-height: 1.55; color: #3b3c39; }
.proekt-reshenie { margin: 0; padding: 12px 14px; border-left: 2px solid #dcddd9; color: #5f605c; font-size: 13px; line-height: 1.5; }
.proekt-reshenie b { display: block; margin-bottom: 4px; color: #171817; font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.polosa { height: 5px; border-radius: 3px; background: #efeee9; overflow: hidden; }
.polosa i { display: block; height: 100%; background: linear-gradient(90deg, #36a7e8, #217db5); }
.proekt[data-etap="research"] .polosa i { background: linear-gradient(90deg, #e8a068, #b85f2b); }
.proekt[data-etap="zakryt"] .polosa i { background: #b4b2a9; }
.mini-karta { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 14px; }
.mini-karta .kletka { width: auto; height: auto; border-radius: 2px; }
.proekt-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; color: #8b9294; font-size: 11px; }

.feed { max-width: 860px; margin-top: 100px; }
.den { margin-bottom: 40px; }
.den-shapka { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.den-shapka .day-label { margin: 0; }
.den-schet { color: #8b9294; font-size: 11px; }
.zapis { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid #e6e5e0; font-size: 14px; line-height: 1.5; }
.zapis:last-child { border-bottom: 1px solid #e6e5e0; }
.zapis time { color: #8b9294; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; padding-top: 3px; }
.chip { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 999px; background: #efeee9; color: #4b4c48; font-size: 11px; font-weight: 700; vertical-align: 1px; white-space: nowrap; }
.pusto { color: #8b9294; font-size: 13px; }

@media (max-width: 760px) {
  .metriki { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrika { padding: 16px; border-radius: 14px; }
  .karta { grid-template-rows: repeat(7, 10px); grid-auto-columns: 10px; gap: 3px; }
  .karta .kletka { width: 10px; height: 10px; }
  .proekty { grid-template-columns: 1fr; }
  .proekt { padding: 20px 18px 16px; }
  .zapis { grid-template-columns: 1fr; gap: 4px; }
  .legenda { display: none; }
}

/* Окно подробностей проекта. Карточка — кнопка: клик или Enter открывает
   окно, Esc и клик по затемнению закрывают. Движение короткое и
   отключается, если человек просил меньше движения. */
.proekt { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.proekt:hover, .proekt:focus-visible { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(36, 44, 49, .12); outline: none; }
.proekt:focus-visible { box-shadow: 0 0 0 3px rgba(34, 132, 198, .35), 0 16px 40px rgba(36, 44, 49, .12); }
.modal { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 26px; background: #fff; color: #171817; box-shadow: 0 30px 80px rgba(20, 24, 28, .25); overflow: auto; }
.modal::backdrop { background: rgba(23, 24, 23, .45); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in .22s cubic-bezier(.2, .8, .2, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal[open] { animation: none; } .proekt { transition: none; } }
.modal-telo { padding: 32px 36px 28px; }
.modal-shapka { display: flex; align-items: flex-start; gap: 14px; }
.modal-shapka .monogramma { width: 52px; height: 52px; font-size: 20px; border-radius: 15px; }
.modal-shapka h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.02; }
.modal-zakryt { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #efeee9; color: #4b4c48; font-size: 18px; line-height: 1; cursor: pointer; }
.modal-zakryt:hover { background: #e3e2dc; }
.modal-opisanie { margin: 22px 0 0; font-size: 17px; line-height: 1.55; color: #3b3c39; }
.modal-fakty { display: flex; flex-wrap: wrap; gap: 7px; margin: 18px 0 0; padding: 0; list-style: none; }
.modal-fakty li { padding: 6px 11px; border: 1px solid #dde2e4; border-radius: 999px; color: #596971; font-size: 12px; }
.modal-reshenie { margin: 22px 0 0; }
.modal-stat { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; }
.modal-stat div { padding: 14px 16px; border-radius: 14px; background: #f4f3ef; }
.modal-stat p { margin: 0; }
.modal-stat .metrika-label { font-size: 11px; }
.modal-stat .metrika-value { font-size: 26px; }
.modal-polosa { margin-top: 18px; }
.modal-polosa-podpis { display: flex; justify-content: space-between; margin-top: 6px; color: #8b9294; font-size: 11px; }
.modal-lenta { margin: 26px 0 0; }
.modal-lenta h3 { margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 20px; font-weight: 400; }
.modal-lenta .zapis { grid-template-columns: 76px 1fr; padding: 9px 0; font-size: 13px; }
.modal-knopki { display: flex; align-items: center; gap: 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e6e5e0; }
.knopka { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: #171817; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.knopka:hover { background: #2e2f2d; }
.net-stranicy { color: #8b9294; font-size: 13px; }
@media (max-width: 760px) {
  .modal { width: calc(100vw - 16px); max-height: calc(100vh - 24px); border-radius: 20px; }
  .modal-telo { padding: 22px 18px 20px; }
  .modal-stat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-lenta .zapis { grid-template-columns: 1fr; }
  .modal-knopki { flex-direction: column; align-items: stretch; }
  .knopka { justify-content: center; }
}
