/* «Тетрадь» — komanda.ngo/tetrad/: the feed, a material, the readers' forms.
   The pages are drawn by the Office inside the site's own header and footer (_tetrad.html from build.py). */

.tetrad .t-hero { padding-bottom: 200px; }
.tetrad .t-hero .page-lead { max-width: 700px; }

/* search on the red top */
.t-search { display: flex; gap: 8px; margin-top: 28px; max-width: 560px; }
.t-search input { flex: 1; min-width: 0; border: 0; border-radius: 999px; padding: 13px 20px; font: inherit; font-size: 15px; color: #2a2422; background: #ffffff; }
.t-search input:focus { outline: 3px solid rgba(255,255,255,0.55); }
.t-search button { border: 1px solid rgba(255,255,255,0.7); background: none; color: #ffffff; border-radius: 999px; padding: 12px 22px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.t-search button:hover { background: rgba(255,255,255,0.14); }

/* «Полезное для новоприбывших» */
.t-pinned { padding-bottom: 30px; }
.t-pins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.t-pin { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; border: 1px solid #eee2df; border-radius: 18px; text-decoration: none; color: #2a2422; background: #ffffff; transition: border-color .2s ease, box-shadow .2s ease; }
.t-pin:hover { border-color: #e8322b; box-shadow: 0 12px 30px rgba(120, 20, 15, 0.08); }
.t-pin b { font-size: 17px; line-height: 1.35; }
.t-pin span { font-size: 14px; line-height: 1.55; color: #5c5250; }
.t-pin small { margin-top: auto; font-size: 12.5px; color: #8a7d7a; }

/* filters: type tabs and topics */
.t-feed-wrap { padding-top: 50px; }
.t-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid #eee2df; padding-bottom: 14px; }
.t-tabs a { padding: 9px 18px; border-radius: 999px; text-decoration: none; color: #2a2422; font-size: 15px; }
.t-tabs a:hover { background: #f6efed; }
.t-tabs a.on { background: #2a2422; color: #ffffff; }
.t-topics { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 30px; }
.t-topics a { padding: 6px 14px; border: 1px solid #e3d6d2; border-radius: 999px; text-decoration: none; color: #5c5250; font-size: 13.5px; }
.t-topics a:hover { border-color: #e8322b; color: #2a2422; }
.t-topics a.on { border-color: #e8322b; background: #e8322b; color: #ffffff; }
.t-found { font-size: 15px; color: #5c5250; margin-bottom: 22px; }
.t-found a, .t-empty a { color: inherit; text-decoration: underline; text-decoration-color: #e8322b; text-underline-offset: 3px; }
.t-empty { font-size: 16px; color: #5c5250; padding: 30px 0; }

/* cards */
.t-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 22px; }
.t-card { display: flex; flex-direction: column; text-decoration: none; color: #2a2422; border-radius: 18px; overflow: hidden; background: #ffffff; border: 1px solid #eee2df; transition: box-shadow .25s ease, transform .25s ease; }
.t-card:hover { box-shadow: 0 18px 40px rgba(120, 20, 15, 0.1); transform: translateY(-2px); }
.t-cover { aspect-ratio: 16 / 9; position: relative; overflow: hidden; display: flex; align-items: flex-end; padding: 18px 20px; color: #ffffff; }
.t-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t-cover span { position: relative; font-size: 30px; font-weight: 700; letter-spacing: -0.01em; opacity: 0.95; }
/* the type's own cover when a material has none */
.t-cover-news { background: linear-gradient(135deg, #ee2e2d 0%, #f37d7d 100%); }
.t-cover-guide { background: linear-gradient(135deg, #2a2422 0%, #5c4744 100%); }
.t-cover-story { background: linear-gradient(135deg, #f59a9b 0%, #ee2e2d 100%); }
.t-cover-report { background: linear-gradient(135deg, #8a2a22 0%, #ee2e2d 100%); }
.t-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.t-kind { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #ed2c2c; }
.t-card h3 { font-size: 19px; line-height: 1.3; font-weight: 700; }
.t-card p { font-size: 14.5px; line-height: 1.55; color: #5c5250; }
.t-meta { margin-top: auto; padding-top: 6px; font-size: 12.5px; color: #8a7d7a; }
.t-more-wrap { text-align: center; margin-top: 36px; }
.page-section .t-more { color: #2a2422; border-color: #d9cdc9; }
.page-section .t-more:hover { background: #f6efed; }
.t-more[aria-busy="true"] { opacity: 0.5; pointer-events: none; }

/* a material */
.t-head-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 14px; color: rgba(255,255,255,0.9); }
.t-head-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.t-head-topics a { padding: 5px 12px; border: 1px solid rgba(255,255,255,0.6); border-radius: 999px; color: #ffffff; text-decoration: none; font-size: 13px; }
.t-head-topics a:hover { background: rgba(255,255,255,0.14); }
.t-article-wrap { padding-top: 40px; }
.t-article { max-width: 760px; }
.t-banner { max-width: 760px; margin-bottom: 28px; padding: 14px 18px; border-radius: 14px; background: #fdf0ef; border: 1px solid #f5c9c6; font-size: 15px; line-height: 1.6; color: #2a2422; }
.t-banner a { color: inherit; text-decoration: underline; text-decoration-color: #e8322b; text-underline-offset: 3px; }
.t-article-cover { margin-bottom: 32px; }
.t-article-cover img { width: 100%; border-radius: 18px; display: block; }
.t-toc { margin-bottom: 34px; padding: 18px 22px; border-radius: 16px; background: #faf8f7; }
.t-toc-label { font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #ed2c2c; margin-bottom: 10px; }
.t-toc ol { padding-left: 20px; display: grid; gap: 6px; font-size: 15px; }
.t-toc a { color: #2a2422; }

/* the text of a material */
.t-body { font-size: 17px; line-height: 1.72; color: #2a2422; }
.t-body > * + * { margin-top: 16px; }
.t-body h2 { font-size: 27px; line-height: 1.25; font-weight: 700; margin-top: 44px; scroll-margin-top: 90px; }
.t-body h3 { font-size: 20px; line-height: 1.3; font-weight: 700; margin-top: 30px; scroll-margin-top: 90px; }
.t-body h2 + *, .t-body h3 + * { margin-top: 12px; }
.t-body p { color: #3d3533; }
.t-body ul, .t-body ol { padding-left: 24px; display: grid; gap: 8px; color: #3d3533; }
.t-body ul ul, .t-body ol ol, .t-body ul ol, .t-body ol ul { margin-top: 8px; }
.t-body li::marker { color: #e8322b; }
.t-body a { color: inherit; text-decoration: underline; text-decoration-color: #e8322b; text-underline-offset: 3px; }
.t-body a:hover { color: #e8322b; }
.t-body strong { font-weight: 700; }
.t-body blockquote { border-left: 3px solid #e8322b; padding: 2px 0 2px 20px; font-size: 19px; color: #2a2422; }
.t-body .t-note { padding: 16px 20px; border-radius: 14px; background: #fff4e0; color: #2a2422; font-size: 16px; }
.t-body hr { border: 0; border-top: 1px solid #eee2df; margin: 34px 0; }
.t-body figure img { width: 100%; border-radius: 14px; display: block; }
.t-body figcaption { font-size: 13.5px; color: #8a7d7a; margin-top: 8px; }
.t-table { overflow-x: auto; }
.t-body table { border-collapse: collapse; width: 100%; font-size: 15px; }
.t-body th, .t-body td { border-bottom: 1px solid #eee2df; padding: 10px 12px; text-align: left; vertical-align: top; }
.t-body th { font-weight: 700; background: #faf8f7; }
.t-checked { margin-top: 30px; font-size: 14px; color: #8a7d7a; }

/* video about the material in social networks */
.t-video { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 30px; }
.t-video-h { font-size: 14px; color: #5c5250; margin-right: 4px; }
.t-soc { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid #d9cdc9; color: #2a2422; text-decoration: none; font-size: 14px; }
.t-soc::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #e8322b; }
.t-soc:hover { border-color: #e8322b; background: #fdf0ef; }
.t-soc-tg::before { background: #2f8fcf; }
.t-soc-ig::before { background: #d0629b; }
.t-soc-yt::before { background: #e8322b; }
.t-soc-tt::before { background: #2a2422; }
.t-soc-fb::before { background: #3b5bb5; }
.t-soc-vk::before { background: #2787f5; }

/* a poll inside the text */
.t-body .t-poll { margin: 30px 0; padding: 24px 26px; border-radius: 18px; border: 1px solid #eee2df; background: #faf8f7; }
.t-poll-label { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #ed2c2c; }
.t-body .t-poll h3 { margin-top: 8px; font-size: 20px; }
.t-poll form { margin-top: 14px; display: grid; gap: 14px; }
.t-poll fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.t-poll-hint { font-size: 13.5px; color: #8a7d7a; margin-bottom: 4px; }
.t-poll-opt { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid #e3d6d2; border-radius: 12px; background: #ffffff; cursor: pointer; font-size: 16px; line-height: 1.4; }
.t-poll-opt:hover { border-color: #e8322b; }
.t-poll-opt:has(input:checked) { border-color: #e8322b; background: #fdf0ef; }
.t-poll-opt input { accent-color: #e8322b; width: 18px; height: 18px; flex-shrink: 0; }
.t-poll button { justify-self: start; }
.t-poll button[aria-busy="true"] { opacity: 0.5; pointer-events: none; }
.t-poll-note { font-size: 13px; color: #8a7d7a; }
.t-body .t-poll-results { list-style: none; padding: 0; margin-top: 16px; display: grid; gap: 12px; }
.t-poll-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15.5px; color: #2a2422; }
.t-poll-bar { height: 8px; border-radius: 999px; background: #eee2df; margin-top: 6px; overflow: hidden; }
.t-poll-bar i { display: block; height: 100%; background: #e8322b; border-radius: 999px; }
.t-poll-done { margin-top: 12px; font-size: 16px; color: #2f8156; }
.t-poll-error { margin-top: 10px; padding: 10px 14px; border-radius: 10px; background: #fdf0ef; color: #b3261e; font-size: 14.5px; }
.t-poll .t-poll-results + .t-poll-note { margin-top: 12px; }

/* «Нашли устаревшую информацию?» */
.t-fix { margin-top: 26px; border-top: 1px solid #eee2df; padding-top: 18px; }
.t-fix summary { cursor: pointer; font-size: 16px; color: #2a2422; text-decoration: underline; text-decoration-color: #e8322b; text-underline-offset: 4px; width: fit-content; }
.t-fix form { margin-top: 18px; }
.t-ok { margin-top: 14px; font-size: 15px; color: #2f8156; }

/* forms */
.t-form { display: grid; gap: 16px; max-width: 620px; }
.t-form-wide { max-width: 760px; }
.t-form label { display: grid; gap: 6px; font-size: 14.5px; color: #2a2422; }
.t-form label small { color: #8a7d7a; font-size: 13px; }
.t-form input:not([type=radio]):not([type=checkbox]), .t-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #d9cdc9; border-radius: 12px; font: inherit; font-size: 15px; color: #2a2422; background: #ffffff; }
.t-form textarea { resize: vertical; line-height: 1.6; }
.t-form input:focus, .t-form textarea:focus { outline: 2px solid #e8322b; outline-offset: 1px; border-color: transparent; }
.t-form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 10px; }
.t-form legend { font-size: 14.5px; color: #2a2422; margin-bottom: 8px; }
.t-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.t-choices label, .t-form .t-agree { display: flex; gap: 8px; align-items: center; }
.t-form input[type=radio], .t-form input[type=checkbox] { accent-color: #e8322b; width: 17px; height: 17px; }
.t-form .t-agree a { color: inherit; text-decoration: underline; text-decoration-color: #e8322b; }
.t-form button { justify-self: start; }
.t-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.t-error { padding: 12px 16px; border-radius: 12px; background: #fdf0ef; color: #b3261e; font-size: 15px; }
.t-sent h2 { margin-bottom: 10px; }

/* the support block at the end */
.t-support { max-width: 760px; margin-top: 50px; padding: 28px 30px; border-radius: 22px; background: linear-gradient(135deg, #ee2e2d 0%, #f37d7d 100%); color: #ffffff; }
.t-support p { font-size: 16.5px; line-height: 1.65; }
.page-section .t-support .page-btn.solid { background: #ffffff; color: #ed2c2c; }
.page-section .t-support .page-btn.solid:hover { background: #2a2422; color: #ffffff; }
.page-section .t-support .page-btn.ghost { color: #ffffff; border-color: rgba(255,255,255,0.7); }
.page-section .t-support .page-btn.ghost:hover { background: rgba(255,255,255,0.14); }
.t-related h2 { margin-bottom: 26px; }

@media (max-width: 1100px) {
  .t-grid, .t-pins { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .t-grid, .t-pins { grid-template-columns: minmax(0, 1fr); }
  .tetrad .t-hero { padding-bottom: 150px; }
  .t-body { font-size: 16px; }
  .t-body h2 { font-size: 23px; }
  .t-search button { padding: 12px 16px; }
  .t-support { padding: 22px 20px; }
  .t-tabs { flex-wrap: nowrap; overflow-x: auto; }
  .t-tabs a { white-space: nowrap; }
}
