.az-smart { background: linear-gradient(152deg, #f6f9ff 0%, #fff 70%); }
.az-smart [hidden], .az-smart-actions [hidden] { display: none !important; }
.az-smart__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.az-smart__head h2 { margin: 0; color: var(--az-ink); font-size: var(--az-type-section); line-height: 1.1; font-weight: 770; letter-spacing: -.04em; }
.az-smart__description { max-width: 570px; margin: 12px 0 0; color: var(--az-muted-strong); font-size: 15px; line-height: 1.55; }
.az-smart__topics { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: clamp(22px, 3vw, 34px); }
.az-smart__topic { min-height: 42px; border: 1px solid #dce5f0; background: #fff; color: #2f3e56; border-radius: 999px; padding: 8px 18px; font-size: 13px; font-weight: 720; line-height: 1.3; cursor: pointer; transition: border-color .18s, background .18s, color .18s; }
.az-smart__topic:hover { border-color: #8ca8ce; }
.az-smart__topic[aria-pressed="true"] { border-color: #173963; background: #122e51; color: #fff; }
.az-smart__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 29px); }
.az-smart-card { min-width: 0; border: 1px solid #e5ecf4; border-radius: 19px; background: #fff; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.az-smart-card:hover, .az-smart-card:focus-within { box-shadow: 0 13px 35px rgba(23, 43, 72, .08); transform: translateY(-2px); }
.az-smart-card__media { display: block; aspect-ratio: 16/9; background: #eaf0f7; overflow: hidden; }
.az-smart-card__image { width: 100%; height: 100%; object-fit: cover; }
.az-smart-card__content { padding: 18px 19px 22px; }
.az-smart-card__meta { color: var(--az-muted-strong); font-size: 12px; line-height: 1.4; font-weight: 650; }
.az-smart-card h3 { font-size: clamp(17px, 1.55vw, 23px); letter-spacing: -.025em; line-height: 1.24; font-weight: 755; margin: 11px 0 0; overflow-wrap: anywhere; }
.az-smart-card h3 a { text-decoration: none; }
.az-smart-card h3 a:hover { color: var(--az-accent-dark); }
.az-smart__empty { color: var(--az-muted-strong); font-size: 15px; }
.az-smart__shelf { margin-top: clamp(35px, 5vw, 64px); padding-top: clamp(26px, 4vw, 42px); border-top: 1px solid #dfe7f1; display: grid; gap: clamp(26px, 4vw, 42px); }
.az-smart__shelf-column { min-width: 0; }
.az-smart__shelf-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.az-smart__shelf-kicker { margin: 0 0 7px; color: #2364aa; font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.az-smart__shelf h3 { margin: 0; color: #0c172b; font-size: clamp(25px, 3vw, 34px); line-height: 1.13; font-weight: 780; letter-spacing: -.036em; }
.az-smart__library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.az-smart__library-grid[data-layout="single"] { grid-template-columns: minmax(0, 1fr); }
.az-library-card { min-width: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 1px solid #e0e8f1; border-radius: 20px; box-shadow: 0 8px 24px rgba(26, 48, 78, .035); transition: transform .2s, box-shadow .2s, border-color .2s; }
.az-library-card:hover, .az-library-card:focus-within { transform: translateY(-2px); box-shadow: 0 15px 34px rgba(26, 48, 78, .085); border-color: #cedbeb; }
.az-library-card__media { display: block; flex: 0 0 auto; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #eaf2fd; text-decoration: none; }
.az-library-card__image { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.az-library-card:hover .az-library-card__image { transform: scale(1.025); }
.az-library-card__fallback { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; height: 100%; color: #fff; background: radial-gradient(circle at 17% 14%, #4caaf2, transparent 40%), linear-gradient(128deg, #132d59, #0d5ee8 62%, #081f57); }
.az-library-card__fallback-mark { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.35); border-radius: 16px; background: rgba(255,255,255,.12); font-size: 29px; font-weight: 850; letter-spacing: -.08em; box-shadow: 0 12px 24px rgba(0,16,67,.18); }
.az-library-card__fallback-name { font-size: 24px; font-weight: 800; letter-spacing: -.05em; }
.az-library-card__content { display: flex; flex: 1; flex-direction: column; align-items: start; min-width: 0; padding: clamp(18px, 2.1vw, 25px); }
.az-library-card__meta { margin: 0 0 10px; color: #65738a; font-size: 12px; font-weight: 680; line-height: 1.45; }
.az-library-card__title { margin: 0; font-size: clamp(18px, 1.8vw, 24px); line-height: 1.25; font-weight: 770; letter-spacing: -.03em; overflow-wrap: anywhere; }
.az-library-card__title a { color: #0c172b; text-decoration: none; }
.az-library-card__title a:hover { color: #145bb0; }
.az-library-card__excerpt { margin: 12px 0 0; color: #667285; font-size: 14px; line-height: 1.58; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.az-library-card__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; width: 100%; margin-top: auto; padding-top: 22px; }
.az-library-card__open { color: #15569b; font-size: 13px; line-height: 1.4; font-weight: 760; text-decoration: none; }
.az-library-card__open:hover { text-decoration: underline; text-underline-offset: 3px; }
.az-library-card__remove { border: 0; background: transparent; color: #738094; font-size: 12px; cursor: pointer; padding: 7px 0; }
.az-library-card__remove:hover { color: #b63737; }
.az-smart__library-grid[data-layout="single"] .az-library-card { flex-direction: row; }
.az-smart__library-grid[data-layout="single"] .az-library-card__media { width: 39%; min-height: 225px; aspect-ratio: auto; }
.az-smart__library-grid[data-layout="single"] .az-library-card__content { justify-content: center; }
.az-smart__clear { border: 1px solid #dce6f0; background: #fff; color: #53657d; border-radius: 10px; padding: 10px 14px; font-size: 12px; font-weight: 650; cursor: pointer; }
.az-smart__clear:hover { border-color: #9cb8d7; color: #14599f; }
.az-smart__more { display: block; margin: 20px auto 0; border: 1px solid #cdddeb; border-radius: 12px; background: #fff; color: #173963; padding: 12px 24px; min-height: 44px; font-size: 13px; font-weight: 750; cursor: pointer; }
.az-smart__more:hover { background: #f0f6ff; }
.az-smart__library-empty { display: flex; align-items: center; gap: 18px; padding: 25px; border: 1px dashed #ccd9e9; border-radius: 19px; background: rgba(255,255,255,.72); }
.az-smart__library-empty-icon { flex: 0 0 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 32px; color: #1c69b1; background: #e9f3ff; }
.az-smart__library-empty h4 { margin: 0 0 5px; color: #19273a; font-size: 17px; }
.az-smart__library-empty p { margin: 0; color: #667285; font-size: 13px; line-height: 1.55; }
.az-smart__confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; margin-top: 14px; border-radius: 12px; border: 1px solid #d9e4ee; background: #eef5fc; color: #24354b; font-size: 13px; }
.az-smart__confirm span { margin-right: auto; }
.az-smart__confirm button { min-height: 36px; border: 1px solid #c4d4e5; background: #fff; padding: 7px 13px; border-radius: 9px; color: #203954; cursor: pointer; font-size: 12px; font-weight: 750; }
.az-smart__confirm button[data-az-clear-yes] { background: #173963; border-color: #173963; color: #fff; }
.az-smart__message { margin: 0; color: #2c5c92; font-size: 13px; }
.az-smart__message:empty { display: none; }
.az-smart button:focus-visible, .az-smart a:focus-visible, .az-smart-actions button:focus-visible { outline: 3px solid #6aa6fa; outline-offset: 3px; }
.az-smart-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 12px; margin-top: 16px; }
.az-smart-actions__button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 9px 13px; border: 1px solid #d9e4f0; border-radius: 12px; background: #fff; color: #173963; font-size: 13px; font-weight: 720; cursor: pointer; transition: background .2s, border-color .2s; }
.az-smart-actions__button:hover { background: #eef5ff; border-color: #9db9df; }
.az-smart-actions__button[aria-pressed="true"] { background: #eaf2ff; border-color: #c9daf2; }
.az-smart-actions__button svg { flex: 0 0 17px; }
.az-smart-actions__notice { flex-basis: 100%; color: var(--az-muted-strong); min-height: 0; font-size: 12px; line-height: 1.4; }
.az-smart-actions__notice:empty { display: none; }
@media (max-width: 900px) {
    .az-smart__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .az-smart__library-grid { gap: 15px; }
}
@media (max-width: 650px) {
    .az-smart__head { display: block; }
    .az-smart__grid, .az-smart__library-grid { grid-template-columns: minmax(0, 1fr); }
    .az-smart__topic { min-height: 44px; font-size: 13px; }
    .az-smart__head h2 { font-size: clamp(29px, 8vw, 38px); }
    .az-smart__shelf-head { align-items: center; }
    .az-smart__shelf h3 { font-size: 27px; }
    .az-library-card, .az-smart__library-grid[data-layout="single"] .az-library-card { flex-direction: column; }
    .az-library-card__media, .az-smart__library-grid[data-layout="single"] .az-library-card__media { width: 100%; aspect-ratio: 16/9; min-height: 0; }
    .az-library-card__content { padding: 19px; }
    .az-library-card__title { font-size: 20px; }
    .az-library-card__remove { min-height: 40px; }
    .az-smart__clear { font-size: 11px; padding: 8px 10px; }
    .az-smart__library-empty { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .az-smart-card, .az-library-card, .az-library-card__image { transition: none; }
}
