/* Справочник сценариев атак. Вкладки режимов берутся из osi.css (.osi-tabs) */

.at-panel{ display:flex; flex-direction:column; gap:14px; }
.at-panel.is-enter{ animation:osiIn .2s ease both; }
.at-lead{ margin:0; color:var(--muted); font-size:14px; line-height:1.6; max-width:820px; }

/* Фильтры по разделам */
.at-chips{ display:flex; flex-wrap:wrap; gap:6px; }
.at-chip{
  display:inline-flex; align-items:center; gap:7px;
  border:1px solid var(--line); background:var(--bg); color:var(--text);
  border-radius:4px; padding:6px 11px; font:inherit; font-size:13px; font-weight:600; cursor:pointer;
  transition:border-color .16s ease, color .16s ease, background .16s ease;
}
.at-chip:hover{ border-color:var(--accent); color:var(--accent); }
.at-chip.active{ background:rgba(249,201,64,.08); border-color:rgba(249,201,64,.4); color:var(--accent); }
.at-chip__n{ font-family:var(--mono); font-size:11px; font-weight:400; color:var(--muted); }
.at-chip.active .at-chip__n{ color:inherit; opacity:.8; }

/* Карточки */
.at-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:10px; align-items:start; }
.at-card{ background:var(--panel); border:1px solid var(--line); border-radius:6px; display:flex; flex-direction:column; transition:border-color .16s ease; }
.at-card:hover{ border-color:#45455a; }
.at-card.is-open{ grid-column:1 / -1; border-color:rgba(249,201,64,.35); }
.at-card__head{ display:flex; align-items:flex-start; gap:12px; width:100%; text-align:left; border:none; background:transparent; color:inherit; font:inherit; padding:12px 14px 4px; cursor:pointer; }
.at-card__num{ flex:0 0 auto; min-width:26px; height:26px; display:inline-flex; align-items:center; justify-content:center; font-family:var(--mono); font-size:12px; font-weight:700; color:var(--accent); border:1px solid rgba(249,201,64,.3); border-radius:4px; }
.at-card__titles{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.at-card__titles b{ font-size:14px; line-height:1.35; }
.at-card__titles small{ font-size:12px; color:var(--muted); line-height:1.4; }
.at-card__sec{ flex:0 0 auto; font-family:var(--mono); font-size:10.5px; color:var(--muted); align-self:center; text-align:right; max-width:150px; }
.at-card__fold{ flex:0 0 auto; width:10px; height:10px; margin-top:8px; border-right:1.6px solid var(--muted); border-bottom:1.6px solid var(--muted); transform:rotate(45deg); transition:transform .16s ease; }
.at-card.is-open .at-card__fold{ transform:rotate(-135deg); margin-top:12px; }
.at-card__essence{ margin:0; padding:0 14px 12px 52px; font-size:13px; line-height:1.55; color:var(--muted); }
.at-card__body{ padding:4px 14px 16px 52px; display:flex; flex-direction:column; gap:14px; }
.at-aliases{ margin:0; font-size:12px; color:var(--muted); font-style:italic; }

/* Классификация */
.at-class{ display:flex; flex-direction:column; gap:6px; border:1px solid var(--line); border-radius:5px; padding:10px 12px; background:var(--bg); }
.at-class__row{ display:flex; gap:10px; align-items:baseline; flex-wrap:wrap; }
.at-class__label{ flex:0 0 auto; width:64px; font-family:var(--mono); font-size:10.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; }
.at-class__val{ flex:1; min-width:0; display:flex; flex-wrap:wrap; gap:6px; align-items:baseline; }
.at-ref{ font-family:var(--mono); font-size:11.5px; color:var(--accent); text-decoration:none; border-bottom:1px dashed rgba(249,201,64,.4); }
.at-ref:hover{ border-bottom-style:solid; }
.at-ref--owasp{ padding:1px 7px; border:1px solid rgba(249,201,64,.3); border-radius:999px; border-bottom:1px solid rgba(249,201,64,.3); }
.at-ref--owasp:hover{ background:rgba(249,201,64,.08); }
.at-ref--plain{ color:var(--text-2); border:none; cursor:default; }
.at-ref__note{ font-size:11.5px; color:var(--muted); line-height:1.5; }

/* Секции */
.at-sec h4{ margin:0 0 6px; font-family:var(--mono); font-size:11px; font-weight:700; color:var(--accent); text-transform:uppercase; letter-spacing:.04em; }
.at-sec p{ margin:0; font-size:13.5px; line-height:1.6; color:var(--text); }
.at-sec ul{ margin:0; padding-left:18px; font-size:13.5px; line-height:1.6; color:var(--text); }
.at-sec li + li{ margin-top:4px; }
.at-sec--boundary p, .at-sec--chain .at-chain{ border-left:2px solid var(--line); padding-left:10px; color:var(--muted); font-family:var(--mono); font-size:12.5px; }
.at-sec--defense h4{ color:var(--green); }
.at-sec--defense ul{ border-left:2px solid rgba(97,209,173,.4); padding-left:16px; }

/* Связь с OWASP */
.at-owasp{ display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:10px; }
.at-owasp__group{ border:1px solid var(--line); border-radius:6px; padding:12px 14px; background:var(--panel); display:flex; flex-direction:column; gap:8px; }
.at-owasp__head{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.at-owasp__head span{ font-family:var(--mono); font-size:11px; color:var(--muted); }
.at-owasp__items{ display:flex; flex-direction:column; gap:4px; }
.at-owasp__item{ display:flex; align-items:center; gap:8px; width:100%; text-align:left; border:none; background:transparent; color:var(--text); border-radius:4px; padding:5px 6px; font:inherit; font-size:13px; cursor:pointer; }
.at-owasp__item:hover{ background:#26262f; color:var(--accent); }
.at-owasp__item .at-card__num{ min-width:22px; height:22px; font-size:11px; }

/* Тренажёр */
.at-quiz__top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.at-score{ font-family:var(--mono); font-size:12px; color:var(--muted); white-space:nowrap; }
.at-quiz{ padding:18px 20px; display:flex; flex-direction:column; gap:12px; max-width:860px; }
.at-quiz__label{ font-family:var(--mono); font-size:11px; color:var(--accent); text-transform:uppercase; letter-spacing:.04em; }
.at-quiz__q{ margin:0; font-size:15px; line-height:1.6; }
.at-quiz__opts{ display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:8px; }
.at-opt{ display:flex; flex-direction:column; gap:3px; text-align:left; border:1px solid var(--line); background:var(--bg); color:var(--text); border-radius:4px; padding:10px 12px; font:inherit; cursor:pointer; transition:border-color .16s ease; }
.at-opt:hover:not(:disabled){ border-color:var(--accent); }
.at-opt:disabled{ cursor:default; }
.at-opt b{ font-size:13.5px; }
.at-opt span{ font-size:11.5px; color:var(--muted); }
.at-opt.is-right{ border-color:var(--green); background:rgba(97,209,173,.08); }
.at-opt.is-wrong{ border-color:var(--danger); background:rgba(255,143,143,.06); }
.at-opt.is-dim{ opacity:.5; }
.at-quiz__answer{ border-left:2px solid var(--line); padding-left:12px; display:flex; flex-direction:column; gap:6px; }
.at-quiz__answer.is-ok{ border-color:var(--green); }
.at-quiz__answer.is-err{ border-color:var(--danger); }
.at-quiz__answer p{ margin:0; font-size:13.5px; line-height:1.6; color:var(--muted); }
.at-quiz__next{ display:flex; gap:8px; flex-wrap:wrap; margin-top:4px; }

.page-sub--note{ font-size:12.5px; color:var(--muted); border-left:2px solid var(--line); padding-left:12px; margin-top:-6px; }

@media (max-width: 640px){
  .at-grid, .at-owasp{ grid-template-columns:1fr; }
  .at-card__essence, .at-card__body{ padding-left:14px; }
  .at-card__sec{ display:none; }
}
