/* How it works page, sixth section (template-parts/hiw/preview.php and preview-screen.php,
   docs/sections/hiw/hiw-platform-preview-faq.png, upper part). Fonts and --amh-* colours: home-hero.css
   (body .amerlink-genesis-home). The drawn screens (.hiw-ps) are containers: everything inside is in cqi of the screen
   width, so a screen scales as one picture. */

.hiw-preview {
    padding: clamp(56px, 5vw, 96px) 0;
    background: linear-gradient(180deg, #f5f9fe 0%, #edf4fc 100%);
    color: #33446a;
}

.hiw-preview-inner {
    width: min(100% - 64px, 1510px);
    margin-inline: auto;
}

.hiw-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: clamp(24px, 2.2vw, 40px);
}

.hiw-preview-heading {
    min-width: 0;
}

.hiw-preview-eyebrow {
    margin: 0 0 clamp(8px, .7vw, 12px);
    color: var(--amh-pink);
    font-size: clamp(13px, 1vw, 17px);
    font-weight: 800;
    letter-spacing: .16em;
    line-height: 1.3;
    text-transform: uppercase;
}

.hiw-preview-title {
    margin: 0;
    padding: 0;
    color: var(--amh-navy);
    font-family: inherit;
    font-size: clamp(30px, 2.6vw, 50px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.1;
}

.hiw-preview-description {
    margin: clamp(10px, .9vw, 16px) 0 0;
    font-size: clamp(16px, 1.15vw, 21px);
    line-height: 1.5;
}

.hiw-preview-button {
    display: inline-flex;
    min-height: 57px;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
    padding: 12px 28px;
    border: 2px solid var(--amh-navy);
    border-radius: 8px;
    background: rgba(255, 255, 255, .6);
    color: var(--amh-navy);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.hiw-preview-button span {
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: .7;
}

.hiw-preview-button:hover,
.hiw-preview-button:focus-visible {
    background: var(--amh-navy);
    color: #fff;
}

.hiw-preview-button:focus-visible {
    outline: 3px solid var(--amh-blue);
    outline-offset: 2px;
}

.hiw-preview-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(16px, 1.4vw, 24px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.hiw-preview-card {
    min-width: 0;
    margin: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(1, 33, 106, .08);
    container: hiw-preview-card / inline-size;
}

.hiw-preview-card-inner {
    display: grid;
    height: 100%;
    grid-template-columns: minmax(0, 41fr) minmax(0, 59fr);
    align-items: center;
    gap: 3.4cqi;
    padding: 3.2cqi .9cqi 3.2cqi 4.5cqi;
}

.hiw-preview-icon {
    display: grid;
    width: clamp(48px, 12cqi, 64px);
    aspect-ratio: 1;
    place-items: center;
    margin-bottom: 3.5cqi;
    border-radius: 50%;
    background: #fde8f1;
    color: var(--amh-pink);
}

.hiw-preview-icon svg {
    width: 52%;
    height: 52%;
}

.hiw-preview-card-title {
    margin: 0 0 8px;
    padding: 0;
    color: var(--amh-navy);
    font-family: inherit;
    font-size: clamp(17px, 4.6cqi, 26px);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.hiw-preview-card-text {
    margin: 0;
    font-size: clamp(14px, 3.3cqi, 17px);
    line-height: 1.45;
}

.hiw-preview-visual {
    min-width: 0;
}

.hiw-preview-shot {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(1, 33, 106, .14);
}

/* Narrow cards: the texts above the screen. */
@container hiw-preview-card (max-width: 379px) {
    .hiw-preview-card-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 22px 20px 20px;
    }

    .hiw-preview-copy {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        column-gap: 14px;
    }

    .hiw-preview-icon {
        width: 48px;
        margin: 0;
        grid-row: span 2;
    }

    .hiw-preview-card-title {
        margin-bottom: 4px;
        font-size: 19px;
    }

    .hiw-preview-card-text {
        font-size: 15px;
    }
}

/* ---- The drawn screens ---- */

.hiw-ps {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    aspect-ratio: 268 / 194;
    border: 1px solid #e3eaf4;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(1, 33, 106, .14), 0 1px 3px rgba(1, 33, 106, .06);
    color: #0c1d45;
    container: hiw-ps / inline-size;
    user-select: none;
}

.hiw-ps-bar {
    display: flex;
    height: 7cqi;
    flex: 0 0 auto;
    align-items: center;
    gap: 1.4cqi;
    padding: 0 3cqi;
    background: #0b1f4d;
}

.hiw-ps-bar > i {
    width: 1.6cqi;
    height: 1.6cqi;
    border-radius: 50%;
    background: rgba(255, 255, 255, .85);
}

.hiw-ps-bar b {
    margin-left: .8cqi;
    color: #fff;
    font-size: 2.5cqi;
    font-weight: 700;
    opacity: .9;
}

.hiw-ps-pills {
    display: flex;
    gap: 1.2cqi;
    margin-left: auto;
}

.hiw-ps-pills i {
    width: 5.4cqi;
    height: 2.2cqi;
    border-radius: 99px;
    background: rgba(255, 255, 255, .55);
}

.hiw-ps-pills i:first-child {
    width: 7cqi;
}

.hiw-ps-body {
    position: relative;
    min-height: 0;
    flex: 1 1 auto;
    padding: 3.6cqi 4cqi;
    font-size: 3.2cqi;
    line-height: 1.3;
}

.hiw-ps b,
.hiw-ps small,
.hiw-ps span {
    font-family: inherit;
}

.hiw-ps-title {
    display: block;
    margin-bottom: 3cqi;
    color: #0c1d45;
    font-size: 4.4cqi;
    font-weight: 800;
    letter-spacing: -.02em;
}

.hiw-ps ul,
.hiw-ps ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hiw-ps li {
    margin: 0;
}

.hiw-ps small {
    display: block;
    color: #6a7a98;
    font-size: 2.4cqi;
}

.hiw-ps-thumb {
    width: 9cqi;
    height: 7cqi;
    flex: 0 0 auto;
    border-radius: 1cqi;
    object-fit: cover;
}

.hiw-ps-list {
    display: grid;
    gap: 1.6cqi;
}

.hiw-ps-list li {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 2cqi;
    padding: 1.3cqi 1.6cqi;
    border: .25cqi solid #edf2f8;
    border-radius: 1.6cqi;
    background: #fff;
    box-shadow: 0 .4cqi 1.6cqi rgba(1, 33, 106, .07);
}

.hiw-ps-list li > span {
    min-width: 0;
}

.hiw-ps-list b {
    display: block;
    overflow: hidden;
    font-size: 2.8cqi;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tabs: boxes (profile) or a line (my schools, tasks). */
.hiw-ps-tabs {
    display: flex;
    gap: 1.4cqi;
    margin-top: 3cqi;
}

.hiw-ps-tabs span {
    flex: 1 1 0;
    padding: 1.8cqi 1cqi;
    border-radius: 1.4cqi;
    background: #f4f7fc;
    color: #4a5b7d;
    font-size: 2.7cqi;
    text-align: center;
    white-space: nowrap;
}

.hiw-ps-tabs .is-active {
    background: #eaf2ff;
    color: #2b6bdc;
    font-weight: 700;
}

.hiw-ps-tabs-line {
    gap: 4.5cqi;
    margin: 0 0 2.4cqi;
    border-bottom: .3cqi solid #e6ecf5;
}

.hiw-ps-tabs-line span,
.hiw-ps-tabs-line .is-active {
    flex: none;
    padding: 1.2cqi 0 1.6cqi;
    border-radius: 0;
    background: none;
    text-align: left;
}

.hiw-ps-tabs-line .is-active {
    box-shadow: inset 0 -.6cqi 0 #2b6bdc;
}

/* A side rail of round icons (my schools, tasks). */
.hiw-ps-railed {
    display: grid;
    grid-template-columns: 5cqi minmax(0, 1fr);
    gap: 3.4cqi;
    padding-left: 3cqi;
}

.hiw-ps-rail {
    display: flex;
    flex-direction: column;
    gap: 5cqi;
    padding-top: 1cqi;
}

.hiw-ps-rail i {
    width: 3cqi;
    height: 3cqi;
    border: .35cqi solid #a7b4c9;
    border-radius: 50%;
}

.hiw-ps-main {
    min-width: 0;
}

/* Candidate profile. */
.hiw-ps-split {
    display: grid;
    grid-template-columns: 29% minmax(0, 1fr);
    gap: 3cqi;
}

.hiw-ps-logo {
    display: block;
    margin: .4cqi 0 3.4cqi 1.4cqi;
    color: #0c1d45;
    font-size: 4.8cqi;
    font-weight: 800;
    letter-spacing: -.03em;
}

.hiw-ps-logo::after {
    display: block;
    width: 45%;
    height: .5cqi;
    margin-top: .4cqi;
    border-radius: 1cqi;
    background: var(--amh-pink);
    content: '';
}

.hiw-ps-nav li {
    display: flex;
    align-items: center;
    gap: 1.6cqi;
    padding: 1.5cqi 1.8cqi;
    border-radius: 1.4cqi;
    color: #44567a;
    font-size: 2.8cqi;
}

.hiw-ps-nav i {
    width: 2.4cqi;
    height: 2.4cqi;
    flex: 0 0 auto;
    border: .35cqi solid currentColor;
    border-radius: 50%;
}

.hiw-ps-nav .is-active {
    background: #eef4ff;
    color: #0c1d45;
    font-weight: 700;
}

.hiw-ps-profile {
    display: flex;
    gap: 3cqi;
    padding: 2.4cqi;
    border: .3cqi solid #e8eef7;
    border-radius: 2cqi;
    box-shadow: 0 .4cqi 1.6cqi rgba(1, 33, 106, .06);
}

.hiw-ps-photo {
    width: 24cqi;
    height: 28cqi;
    flex: 0 0 auto;
    border-radius: 1.6cqi;
    object-fit: cover;
    object-position: 50% 20%;
}

.hiw-ps-person {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1.6cqi;
    color: #4a5b7d;
    font-size: 2.7cqi;
    white-space: nowrap;
}

.hiw-ps-name {
    color: #0c1d45;
    font-size: 4.4cqi;
    font-weight: 800;
    letter-spacing: -.02em;
    white-space: normal;
}

.hiw-ps-person em {
    margin-left: 1.4cqi;
    color: var(--amh-pink);
    font-style: normal;
    font-weight: 700;
}

.hiw-ps-flag {
    display: inline-block;
    width: 3.6cqi;
    height: 2.4cqi;
    margin-right: 1.2cqi;
    border-radius: .3cqi;
    background:
        linear-gradient(#3c3b6e, #3c3b6e) 0 0 / 45% 55% no-repeat,
        repeating-linear-gradient(180deg, #b22234 0 14.3%, #fff 14.3% 28.6%);
    vertical-align: -.2cqi;
}

.hiw-ps-dot {
    display: inline-block;
    width: 2.4cqi;
    height: 2.4cqi;
    margin-right: 1.2cqi;
    border: .5cqi solid #08aef3;
    border-radius: 50%;
    vertical-align: -.2cqi;
}

/* Best-fit colleges: the map shows the middle and east of the country. */
.hiw-ps-fit {
    display: grid;
    grid-template-columns: 44% minmax(0, 1fr);
    gap: 3cqi;
}

.hiw-ps-map {
    position: relative;
    overflow: hidden;
    height: 47cqi;
    border: .3cqi solid #e3eaf4;
    border-radius: 2cqi;
    background: #cfe6f8;
}

.hiw-ps-map-canvas {
    position: absolute;
    top: 0;
    left: -30cqi;
    height: 100%;
    aspect-ratio: 380 / 231;
}

.hiw-ps-map-image {
    display: block;
    width: 100%;
    height: 100%;
}

.hiw-ps-pin {
    position: absolute;
    width: 2.6cqi;
    height: 2.6cqi;
    border: .45cqi solid #fff;
    border-radius: 50% 50% 50% 0;
    background: #2b6bdc;
    box-shadow: 0 .3cqi .8cqi rgba(0, 0, 0, .25);
    transform: translate(-50%, -100%) rotate(-45deg);
}

.hiw-ps-pin.is-pink {
    background: var(--amh-pink);
}

/* School explorer. */
.hiw-ps-filters {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 1.8cqi;
    margin-bottom: 3cqi;
}

.hiw-ps-filters span {
    overflow: hidden;
    padding: 1.6cqi 1.8cqi;
    border: .3cqi solid #e1e8f2;
    border-radius: 1.4cqi;
    color: #5a6b8c;
    font-size: 2.5cqi;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hiw-ps-search::before {
    display: inline-block;
    width: 1.8cqi;
    height: 1.8cqi;
    margin-right: 1.2cqi;
    border: .35cqi solid #0c1d45;
    border-radius: 50%;
    content: '';
    vertical-align: -.2cqi;
}

.hiw-ps-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hiw-ps-select::after {
    width: 1.2cqi;
    height: 1.2cqi;
    margin: -.6cqi .4cqi 0 1cqi;
    border-right: .35cqi solid #0c1d45;
    border-bottom: .35cqi solid #0c1d45;
    content: '';
    transform: rotate(45deg);
}

.hiw-ps-colleges {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.2cqi;
}

.hiw-ps-college {
    overflow: hidden;
    padding-bottom: 1.4cqi;
    border: .25cqi solid #edf2f8;
    border-radius: 1.6cqi;
    background: #fff;
    box-shadow: 0 .4cqi 1.6cqi rgba(1, 33, 106, .08);
}

.hiw-ps-campus {
    display: block;
    width: 100%;
    height: 20cqi;
    object-fit: cover;
}

.hiw-ps-college b {
    display: block;
    overflow: hidden;
    padding: 1.4cqi 1.6cqi .4cqi;
    font-size: 2.6cqi;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hiw-ps-college small {
    padding: 0 1.6cqi;
}

/* My schools. */
.hiw-ps-heart {
    width: 3.8cqi;
    flex: 0 0 auto;
    margin-left: auto;
    color: var(--amh-pink);
}

.hiw-ps-heart svg {
    display: block;
    width: 100%;
    height: auto;
    fill: none;
    stroke: #2b4a86;
    stroke-width: 2;
}

.hiw-ps-heart.is-on svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Virtual counselor. */
.hiw-ps-chat {
    display: flex;
    align-items: flex-start;
    gap: 2.4cqi;
}

.hiw-ps-avatar {
    width: 7.6cqi;
    height: 7.6cqi;
    flex: 0 0 auto;
    border-radius: 50%;
    object-fit: cover;
}

.hiw-ps-bubble {
    margin: 0;
    padding: 1.8cqi 2.4cqi;
    border-radius: 2cqi;
    background: #f2f6fc;
    color: #1d2d50;
    font-size: 2.7cqi;
    font-weight: 600;
    line-height: 1.35;
}

.hiw-ps .hiw-ps-answer {
    margin: 2cqi 0 0 10cqi;
    padding: 1.8cqi 2.4cqi;
    border: .3cqi solid #e8eef7;
    border-radius: 2cqi;
    box-shadow: 0 .4cqi 1.6cqi rgba(1, 33, 106, .06);
    counter-reset: hiw-ps;
}

.hiw-ps-answer li {
    position: relative;
    padding-left: 3.4cqi;
    counter-increment: hiw-ps;
}

.hiw-ps-answer li + li {
    margin-top: .9cqi;
}

.hiw-ps-answer li::before {
    position: absolute;
    left: 0;
    content: counter(hiw-ps) '.';
    font-size: 2.6cqi;
    font-weight: 700;
}

.hiw-ps-answer b {
    display: block;
    font-size: 2.6cqi;
    font-weight: 700;
}

.hiw-ps-answer small {
    overflow: hidden;
    font-size: 2.3cqi;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hiw-ps-ask {
    position: absolute;
    right: 4cqi;
    bottom: 3cqi;
    left: 14cqi;
    display: flex;
    gap: 1.8cqi;
}

.hiw-ps-ask span {
    flex: 1 1 auto;
    padding: 1.6cqi 2.2cqi;
    border: .35cqi solid #8bb5f5;
    border-radius: 1.4cqi;
    background: #fff;
    color: #8a97b0;
    font-size: 2.5cqi;
}

.hiw-ps-ask i {
    display: grid;
    width: 7cqi;
    place-items: center;
    border-radius: 1.4cqi;
    background: #2b6bdc;
}

.hiw-ps-ask svg {
    width: 3.6cqi;
    height: 3.6cqi;
    fill: #fff;
}

/* Tasks and timeline. */
.hiw-ps-tasks li {
    display: grid;
    grid-template-columns: 2.8cqi 10cqi minmax(0, 1fr);
    align-items: center;
    gap: 2.2cqi;
    padding: 1.45cqi 1.4cqi;
    border-bottom: .25cqi solid #eef2f8;
    font-size: 2.7cqi;
}

.hiw-ps-tasks i {
    width: 2.8cqi;
    height: 2.8cqi;
    border: .3cqi solid #b8c3d6;
    border-radius: .6cqi;
}

.hiw-ps-tasks b {
    color: var(--amh-pink);
    font-weight: 800;
    white-space: nowrap;
}

.hiw-ps-tasks span {
    overflow: hidden;
    color: #1d2d50;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Up to large laptops: two columns (three would make the screens too small to read). */
@media (max-width: 1400px) {
    .hiw-preview-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hiw-preview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
}

/* Phones: one column. */
@media (max-width: 700px) {
    .hiw-preview-inner {
        width: min(100% - 36px, 660px);
    }

    .hiw-preview-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .hiw-preview-button {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hiw-preview-button {
        transition: none;
    }
}
