.flight-log-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.flight-log-card {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.flight-log-card:first-child {
    background: var(--accent-soft);
}

.flight-log-card:hover,
.flight-log-card:focus-visible {
    border-color: rgba(85, 81, 255, 0.3);
    background: white;
    box-shadow: 0 20px 50px rgba(27, 29, 40, 0.1);
    transform: translateY(-4px);
}

.flight-log-top,
.flight-log-bottom,
.flight-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.flight-log-top,
.flight-log-bottom {
    color: var(--muted);
    font-size: 0.74rem;
}

.flight-log-top strong,
.flight-log-bottom strong {
    color: var(--ink);
    font-weight: 600;
}

.flight-route {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.flight-route > span:first-child,
.flight-route > span:last-child {
    max-width: 36%;
}

.flight-route > span:last-child {
    text-align: right;
}

.route-track {
    position: relative;
    height: 1px;
    flex: 1;
    background: var(--line);
}

.route-track::after {
    position: absolute;
    top: 50%;
    right: -1px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    content: "";
    transform: translateY(-50%);
}

.flight-record-main {
    width: min(calc(100% - 48px), var(--max-width));
    margin-inline: auto;
    padding-block: clamp(54px, 8vw, 104px);
}

.flight-record-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 6vw, 64px);
    border-radius: var(--radius-lg);
    background: var(--ink);
    box-shadow: 0 28px 70px rgba(17, 19, 26, 0.18);
    color: white;
}

.flight-record-hero::after {
    position: absolute;
    right: -110px;
    bottom: -190px;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    box-shadow: inset 0 0 0 80px rgba(255, 255, 255, 0.025), inset 0 0 0 160px rgba(255, 255, 255, 0.025);
    content: "";
    pointer-events: none;
}

.flight-record-breadcrumbs {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: clamp(54px, 9vw, 100px);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.74rem;
}

.flight-record-breadcrumbs a {
    text-decoration: none;
}

.flight-record-breadcrumbs a:hover {
    color: white;
}

.flight-record-heading {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 40px;
}

.flight-record-heading .eyebrow {
    color: var(--mint);
}

.flight-record-heading h1 {
    margin: 0;
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 500;
    letter-spacing: -0.07em;
    line-height: 0.95;
}

.route-code {
    display: flex;
    align-items: center;
    gap: clamp(16px, 4vw, 34px);
}

.route-code span:not(.route-code-line) {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.05em;
}

.route-code-line {
    position: relative;
    width: clamp(55px, 9vw, 120px);
    height: 1px;
    background: rgba(255, 255, 255, 0.28);
}

.route-code-line::after {
    position: absolute;
    top: 50%;
    right: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
    content: "";
    transform: translateY(-50%);
}

.flight-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--line);
}

.flight-summary-item {
    min-height: 116px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.78);
}

.flight-summary-item span {
    display: block;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.flight-summary-item strong {
    font-size: 1rem;
    font-weight: 500;
}

.flight-section {
    padding-top: clamp(58px, 8vw, 94px);
}

.flight-section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.flight-section-header h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 500;
    letter-spacing: -0.05em;
}

.flight-section-header p {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.flight-table-wrap {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
}

.flight-details-table {
    width: 100%;
    border-collapse: collapse;
}

.flight-details-table th,
.flight-details-table td {
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.flight-details-table tr:last-child th,
.flight-details-table tr:last-child td {
    border-bottom: 0;
}

.flight-details-table th {
    width: 30%;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 500;
}

.flight-details-table td {
    font-size: 0.88rem;
}

.flight-details-table details {
    margin: -6px 0;
}

.flight-details-table summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-block: 6px;
    cursor: pointer;
    font-weight: 500;
    list-style: none;
}

.flight-details-table summary::-webkit-details-marker {
    display: none;
}

.flight-details-table summary::before {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-dark);
    content: "+";
    font-size: 0.8rem;
    transition: transform 180ms ease;
}

.flight-details-table details[open] summary::before {
    content: "−";
    transform: rotate(180deg);
}

.detail-more {
    padding: 8px 0 7px 32px;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.8;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.flight-photo {
    overflow: hidden;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.72);
}

.flight-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    object-fit: cover;
    transition: transform 450ms cubic-bezier(0.22, 1, 0.36, 1);
}

.flight-photo:hover img {
    transform: scale(1.02);
}

.flight-photo h3 {
    margin: 16px 8px 8px;
    font-size: 0.84rem;
    font-weight: 500;
}

@media (max-width: 800px) {
    .flight-log-grid,
    .photo-grid {
        grid-template-columns: 1fr;
    }

    .flight-record-heading {
        grid-template-columns: 1fr;
    }

    .flight-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .flight-record-main {
        width: min(calc(100% - 32px), var(--max-width));
        padding-top: 42px;
    }

    .flight-record-hero {
        padding: 25px;
        border-radius: 25px;
    }

    .flight-record-breadcrumbs {
        margin-bottom: 50px;
    }

    .flight-summary {
        grid-template-columns: 1fr;
    }

    .flight-summary-item {
        min-height: auto;
    }

    .flight-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .flight-details-table th,
    .flight-details-table td {
        display: block;
        width: 100%;
        padding: 16px 18px;
    }

    .flight-details-table th {
        padding-bottom: 4px;
        border-bottom: 0;
    }

    .flight-details-table td {
        padding-top: 4px;
    }
}
