.af-projects {
    --project-blue: #252a68;
    --project-ink: #202333;
    --project-muted: #555f75;
    --project-line: #dce0ee;
    padding: 32px 0 64px;
    background: #f5f6f9;
    color: var(--project-ink);
}
.af-projects-intro { max-width: 850px; margin: 0 0 24px; font-size: 17px; line-height: 1.6; }
.af-project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.af-project-card, .af-project-panel, .af-project-filters {
    background: #fff;
    border: 1px solid var(--project-line, #dce0ee);
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(32, 41, 93, .07);
}
.af-project-card { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.af-project-card__cover { display: grid; place-items: center; aspect-ratio: 16 / 9; background: #eef0f8; color: #252a68; text-align: center; }
.af-project-card__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.af-project-card__body { display: flex; flex: 1; flex-direction: column; gap: 13px; padding: 20px; }
.af-project-card__body h3 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
.af-project-card a, .af-project-manager a, .af-project-privacy { color: #252a68; }
.af-project-card__body p { flex: 1; margin: 0; color: #555f75; overflow-wrap: anywhere; }
.af-project-card__link { font-weight: 700; }
.af-project-card__link span { margin-left: 5px; }
.af-project-tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; margin: 0; padding: 0; }
.af-project-tags li { border-radius: 20px; padding: 5px 10px; background: #eef0fa; color: #252a68; font-weight: 600; font-size: 12px; }
.af-project-manager { display: flex; gap: 10px; align-items: center; }
.af-project-manager img { width: 45px; height: 45px; object-fit: cover; border-radius: 50%; }
.af-project-manager small, .af-project-manager a, .af-project-manager strong { display: block; }
.af-project-manager small { color: #555f75; }
.af-project-manager a { font-weight: 700; text-decoration: underline; }
.af-project-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 22px; padding: 18px; }
.af-project-filters label, .af-project-form-panel label { display: grid; gap: 5px; }
.af-project-filters > .af-project-filter-count { align-self: center; }
.af-project-filters > .af-project-button { font-size: 13px; line-height: 15px; }
@media (min-width: 992px) {
    .af-project-filter-count { margin-inline-start: auto; }
}
.af-project-filters select, .af-project-form-panel input, .af-project-form-panel textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    color: #202333;
    background: #fff;
    border: 1px solid #b8bed5;
    border-radius: 10px;
}
.af-project-button, .af-projects a.af-project-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    padding: 11px 18px;
    border: 1px solid #252a68;
    border-radius: 10px;
    background: #252a68;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
}
.af-project-button > i { flex: 0 0 auto; }
.af-project-button > span { min-width: 0; }
.af-project-button:disabled { opacity: .6; cursor: not-allowed; }
.af-projects a.af-project-button--reset { color: #373b72; background: #f2f2fb; border-color: #d3d5e8; }
.af-projects a.af-project-button--reset:hover { background: #e7e8f7; border-color: #b8bed5; }
.af-projects a.af-project-button--reset:focus-visible { outline: 2px solid #373b72; outline-offset: 2px; }
.af-projects a.af-project-button--outline { background: #fff; color: #252a68; justify-self: start; }
.af-project-detail { display: grid; gap: 22px; }
.af-project-panel { padding: 24px; overflow-wrap: anywhere; }
.af-project-panel h2 { font-size: 24px; margin: 0 0 15px; color: #252a68; }
.af-project-panel h3 { font-size: 17px; margin-bottom: 7px; }
.af-project-section-description { margin-top: 24px; line-height: 1.7; overflow-x: auto; }
.af-project-detail > .af-project-section-description { margin-top: 0; }
.af-project-section-description > :last-child { margin-bottom: 0; }
.af-project-section-description img { max-width: 100%; height: auto; }
.af-project-section-description a { text-decoration: underline; }
.af-project-lead { display: grid; gap: 22px; }
.af-project-lead > div { display: grid; justify-items: start; gap: 15px; }
.af-project-lead > div > p { margin: 0; font-size: 18px; }
.af-project-lead > img { width: 100%; max-height: 580px; object-fit: contain; background: #f3f4f8; border-radius: 12px; }
.af-project-story {
    --story-accent: #252a68;
    --story-tint: #edf0fa;
    border-top: 3px solid var(--story-accent);
    background: linear-gradient(140deg, var(--story-tint) 0, #fff 185px);
}
.af-project-story--task { --story-accent: #765019; --story-tint: #fcf3e4; }
.af-project-story--solution { --story-accent: #255b52; --story-tint: #e8f4f0; }
.af-project-story .af-project-story__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    color: var(--story-accent);
    line-height: 1.25;
}
.af-project-story svg { width: 1em; height: 1em; vertical-align: -.15em; }
.af-project-story__icon {
    display: inline-grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--story-accent);
    border-radius: 12px;
    color: var(--story-accent);
    background: var(--story-tint);
    font-size: 22px;
}
.af-project-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 178px), 1fr));
    gap: 10px;
    margin: 0;
}
.af-project-fact {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #e1e5f0;
    border-radius: 11px;
    background: #f7f8fc;
}
.af-project-fact dt { color: #555f75; font-size: 13px; font-weight: 600; }
.af-project-fact dt > svg { margin-right: .28em; color: var(--story-accent); }
.af-project-fact dd { margin: 4px 0 0; color: #202333; font-weight: 700; }
.af-project-story__copy { max-width: 78ch; margin: 0; line-height: 1.7; }
.af-project-story__participants {
    margin-top: 16px;
    padding: 13px 15px;
    border-left: 3px solid var(--story-accent);
    border-radius: 8px;
    background: var(--story-tint);
}
.af-project-story__participants h3 {
    margin: 0 0 6px;
    color: var(--story-accent);
    font-weight: 700;
}
.af-project-story__participants h3 > svg { margin-right: .3em; }
@media (max-width: 620px) {
    .af-project-story .af-project-story__heading { gap: 9px; margin-bottom: 13px; font-size: 20px; }
    .af-project-story__icon { flex-basis: 36px; width: 36px; height: 36px; border-radius: 9px; font-size: 18px; }
    .af-project-fact { padding: 9px 11px; }
}
.af-project-text { white-space: pre-line; }
.af-project-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 14px; }
.af-project-gallery figure, .af-project-accordion, .af-project-review { margin: 0; padding: 12px; border: 1px solid #dce0ee; border-radius: 12px; }
.af-project-gallery figure img, .af-project-gallery figure video { width: 100%; height: auto; border-radius: 8px; }
.af-project-gallery figure img { aspect-ratio: 16 / 9; object-fit: cover; }
.af-project-gallery__photo {
    position: relative;
    display: block;
    overflow: hidden;
    isolation: isolate;
    border-radius: 8px;
    background: #eef0f8;
    cursor: zoom-in;
}
.af-project-gallery__photo img { display: block; transition: transform .28s ease; }
.af-project-gallery__photo::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: rgba(18, 25, 60, .26);
    content: "";
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
}
.af-project-gallery__zoom {
    position: absolute;
    z-index: 2;
    right: 10px;
    bottom: 10px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid #cbd4f4;
    border-radius: 50%;
    background: #252a68;
    color: #fff;
    box-shadow: 0 3px 12px rgba(10, 16, 44, .25);
    font-size: 18px;
    pointer-events: none;
}
.af-project-gallery__photo:focus-visible {
    outline: 2px solid #252a68;
    outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) {
    .af-project-gallery__zoom {
        top: 50%;
        left: 50%;
        width: 44px;
        height: 44px;
        opacity: 0;
        transform: translate(-50%, calc(-50% + 7px));
        transition: opacity .22s ease, transform .22s ease;
    }
    .af-project-gallery__photo:hover img,
    .af-project-gallery__photo:focus-visible img { transform: scale(1.06); }
    .af-project-gallery__photo:hover::after,
    .af-project-gallery__photo:focus-visible::after { opacity: 1; }
    .af-project-gallery__photo:hover .af-project-gallery__zoom,
    .af-project-gallery__photo:focus-visible .af-project-gallery__zoom {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .af-project-gallery__photo img, .af-project-gallery__photo::after, .af-project-gallery__zoom { transition: none; }
    .af-project-gallery__photo:hover img, .af-project-gallery__photo:focus-visible img { transform: none; }
}
.af-project-gallery figcaption { margin-top: 5px; }
.af-project-accordion { margin-top: 12px; background: #f6f7fb; }
.af-project-accordion summary { color: #252a68; font-weight: 700; cursor: pointer; }
.af-project-accordion[open] summary { margin-bottom: 12px; }
.af-project-review + .af-project-review { margin-top: 10px; }
.af-project-review footer { font-size: 14px; background: transparent; }
.af-project-form-panel { scroll-margin-top: 105px; }
.af-project-grid + .af-project-form-panel, .af-project-pagination + .af-project-form-panel,
.af-project-section-description + .af-project-form-panel { margin-top: 24px; }
.af-project-detail > .af-project-section-description + .af-project-form-panel { margin-top: 0; }
.af-project-form-panel form { display: grid; gap: 14px; }
.af-project-form-grid { display: grid; }
.af-project-pagination { padding: 16px 0; }
.af-author-projects { margin-top: 36px; }
@media (max-width: 1000px) { .af-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
    .af-project-grid { grid-template-columns: 1fr; }
    .af-project-panel { padding: 17px; }
    .af-project-filters label { flex-basis: 100%; }
}

html.af-gallery-viewer-open { overflow: hidden; }

.af-gallery-viewer {
    position: fixed;
    inset: 0;
    width: min(96vw, 1440px);
    height: min(92vh, 1000px);
    height: min(92dvh, 1000px);
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0;
    border: 1px solid #303b57;
    border-radius: 20px;
    overflow: hidden;
    background: #121826;
    color: #f4f6fc;
    box-shadow: 0 24px 90px rgba(0, 0, 0, .48);
}
.af-gallery-viewer:not([open]) { display: none; }
.af-gallery-viewer::backdrop { background: rgba(8, 12, 23, .87); }
.af-gallery-viewer [hidden] { display: none !important; }
.af-gallery-viewer__body {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    height: 100%;
    min-width: 0;
}
.af-gallery-viewer__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 18px;
    background: #192134;
    border-bottom: 1px solid #303b57;
}
.af-gallery-viewer__top h2 { margin: 0; color: inherit; font-size: 17px; line-height: 1.25; }
.af-gallery-viewer__count {
    padding: 4px 12px;
    border: 1px solid #465575;
    border-radius: 999px;
    color: #e0e8ff;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.af-gallery-viewer__button {
    display: inline-grid;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid #526187;
    border-radius: 50%;
    background: #26324c;
    color: #fff;
    cursor: pointer;
}
.af-gallery-viewer__button:hover { background: #3b4d77; }
.af-gallery-viewer__button:focus-visible,
.af-gallery-viewer__thumb:focus-visible { outline: 2px solid #b7c7ff; outline-offset: 3px; }
.af-gallery-viewer__button svg {
    display: block;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}
.af-gallery-viewer__top button { justify-self: end; }
.af-gallery-viewer__stage { position: relative; min-height: 0; min-width: 0; }
.af-gallery-viewer__viewport {
    height: 100%;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    user-select: none;
}
.af-gallery-viewer__viewport.is-swipeable { cursor: grab; }
.af-gallery-viewer__viewport.is-dragging { cursor: grabbing; }
.af-gallery-viewer__track {
    display: flex;
    height: 100%;
    transform: translate3d(calc(-100% + var(--gallery-offset, 0px)), 0, 0);
}
.af-gallery-viewer__track.is-animating { transition: transform .22s ease-out; }
.af-gallery-viewer__slide {
    display: grid;
    flex: 0 0 100%;
    min-width: 0;
    min-height: 0;
    padding: 12px 72px;
    place-items: center;
    box-sizing: border-box;
}
.af-gallery-viewer__slide img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: contain;
    pointer-events: none;
}
.af-gallery-viewer__arrow {
    position: absolute;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .28);
}
.af-gallery-viewer__arrow--prev { left: 15px; }
.af-gallery-viewer__arrow--next { right: 15px; }
.af-gallery-viewer__caption {
    margin: 0;
    padding: 7px 16px;
    max-height: 4.5em;
    overflow: auto;
    color: #e0e8ff;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    overflow-wrap: anywhere;
}
.af-gallery-viewer__thumbs {
    display: flex;
    gap: 8px;
    min-width: 0;
    overflow-x: auto;
    padding: 9px 15px 12px;
    border-top: 1px solid #303b57;
    background: #192134;
    scrollbar-width: thin;
    scrollbar-color: #6478ae #192134;
}
.af-gallery-viewer__thumb {
    flex: 0 0 76px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    background: #273149;
    opacity: .68;
    cursor: pointer;
}
.af-gallery-viewer__thumb[aria-current="true"],
.af-gallery-viewer__thumb:hover { opacity: 1; border-color: #aebeff; }
.af-gallery-viewer__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
    .af-gallery-viewer { width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
    .af-gallery-viewer__top { padding: max(8px, env(safe-area-inset-top)) 10px 8px; }
    .af-gallery-viewer__top h2 { font-size: 14px; }
    .af-gallery-viewer__slide { padding: 5px; }
    .af-gallery-viewer__arrow--prev { left: 7px; }
    .af-gallery-viewer__arrow--next { right: 7px; }
    .af-gallery-viewer__thumbs { padding: 7px 10px max(8px, env(safe-area-inset-bottom)); }
    .af-gallery-viewer__thumb { flex-basis: 61px; height: 43px; }
}
@media (prefers-reduced-motion: reduce) {
    .af-gallery-viewer__track.is-animating { transition: none; }
}

.af-project-review { padding: 16px 18px; }
.af-project-review__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 5px 14px;
    margin-bottom: 8px;
}
.af-project-review__author { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; }
.af-project-review__author span { color: #555f75; font-size: 14px; }
.af-project-review__author > i,
.af-project-review__title > i,
.af-project-review__reply h3 > i { color: #252a68; }
.af-project-review__title > i,
.af-project-review__reply h3 > i { margin-right: .32em; }
.af-project-review__time { color: #555f75; font-size: 13px; white-space: nowrap; }
.af-project-review__time > i { margin-right: .28em; }
.af-project-review p { margin: 0; overflow-wrap: anywhere; }
.af-project-review__reply {
    margin: 14px 0 0 14px;
    padding: 12px 14px;
    border: 1px solid #dce0ee;
    border-left: 3px solid #252a68;
    border-radius: 9px;
    background: #f3f5fd;
}
.af-project-review__reply h3 { margin: 0; color: #252a68; font-size: 15px; font-weight: 700; }
@media (max-width: 620px) {
    .af-project-review { padding: 13px; }
    .af-project-review__reply { margin-left: 0; }
}

.af-project-form-panel {
    box-sizing: border-box;
    min-width: 0;
    background: linear-gradient(145deg, #f9faff 0, #fff 125px);
}
.af-project-form-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.af-project-form-head__icon {
    display: grid;
    flex: 0 0 46px;
    height: 46px;
    place-items: center;
    border: 1px solid #dbe1f6;
    border-radius: 12px;
    color: #252a68;
    background: #edf0fa;
    font-size: 18px;
}
.af-project-form-head h2 { margin: 0 0 4px; line-height: 1.25; }
.af-project-form-head p { margin: 0; color: #555f75; line-height: 1.5; }
.af-project-form-panel form { grid-template-columns: minmax(0, 1fr); }
.af-project-form-panel .af-project-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.af-project-form-panel .af-project-form-field { min-width: 0; margin: 0; font-weight: 600; }
.af-project-form-field small { color: #555f75; font-weight: 400; }
.af-project-form-control { position: relative; display: block; min-width: 0; }
.af-project-form-control > i {
    position: absolute;
    top: 14px;
    left: 13px;
    color: #555e8c;
    pointer-events: none;
}
.af-project-form-panel .af-project-form-control input,
.af-project-form-panel .af-project-form-control textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding-left: 37px;
    background: #fff;
}
.af-project-form-panel .af-project-form-control textarea { min-height: 105px; resize: vertical; }
.af-project-form-panel .af-project-form-control input:focus,
.af-project-form-panel .af-project-form-control textarea:focus {
    outline: 2px solid #757db3;
    outline-offset: 1px;
}
.af-project-form-captcha { min-width: 0; max-width: 100%; overflow-x: auto; }
.af-project-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 17px; min-width: 0; }
.af-project-form-actions .af-project-button { max-width: 100%; }
.af-project-form-actions .af-project-privacy { font-size: 14px; }
.af-project-form-status:empty { display: none; }
.af-project-form-status:not(:empty) { padding: 9px 12px; border-radius: 8px; background: #eef0fa; }
@media (max-width: 720px) {
    .af-project-form-panel .af-project-form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
    .af-project-form-head { gap: 10px; margin-bottom: 16px; }
    .af-project-form-head__icon { flex-basis: 36px; height: 36px; border-radius: 9px; font-size: 15px; }
    .af-project-form-head h2 { font-size: 21px; }
}

.af-project-reviews { scroll-margin-top: 110px; }
.af-project-reviews__status:empty { display: none; }
.af-project-reviews__status:not(:empty) {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #252a68;
    background: #eef0fa;
}
.af-project-reviews__pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
}
.af-project-reviews__pages > a, .af-project-reviews__pages > span {
    display: inline-grid;
    place-items: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 7px;
    border: 1px solid #dce0ee;
    border-radius: 8px;
    color: #252a68;
    text-decoration: none;
}
.af-project-reviews__pages > a:hover { background: #eef0fa; }
.af-project-reviews__pages > [aria-current="page"] { background: #252a68; border-color: #252a68; color: #fff; }
.af-project-reviews__pages > .af-project-reviews__ellipsis { border-color: transparent; }

.af-project-reviews__pages > a[data-review-loading] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-color: #8d98c5;
    background: #eef0fa;
}
.af-project-reviews__pages > a[data-review-loading]::after {
    content: "";
    box-sizing: border-box;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    border: 2px solid #aeb9df;
    border-top-color: #252a68;
    border-radius: 50%;
    animation: af-project-reviews-spin .65s linear infinite;
}
@keyframes af-project-reviews-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .af-project-reviews__pages > a[data-review-loading]::after { animation: none; }
}
