:root {
    color-scheme: light;
    --libya-ink: #172d24;
    --libya-green: #19543f;
    --libya-green-deep: #11372b;
    --libya-muted: #52645a;
    --libya-border: #d6ded3;
    --libya-paper: #fffef9;
    --libya-sand: #f3efe3;
    --libya-accent: #863c32;
    --libya-display: Georgia, "Times New Roman", serif;
    --libya-gutter: clamp(20px, 5vw, 76px);
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--libya-ink);
    background: var(--libya-paper);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.65;
}
img { max-width: 100%; }
a { color: var(--libya-green); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
h1, h2, h3 {
    margin: 0;
    font-family: var(--libya-display);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -.025em;
    text-wrap: balance;
}
h1 { font-size: clamp(2.7rem, 7vw, 4.85rem); }
h2 { font-size: clamp(1.75rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.58rem); }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.libya-container {
    width: min(100%, 1440px);
    margin-inline: auto;
    padding-inline: var(--libya-gutter);
}
.skip-to-content {
    position: absolute;
    z-index: 5;
    top: 8px;
    left: 8px;
    transform: translateY(calc(-100% - 10px));
    padding: .5rem 1rem;
    background: var(--libya-paper);
}
.skip-to-content:focus { transform: translateY(0); }

.site-header {
    border-bottom: 1px solid var(--libya-border);
    background: var(--libya-paper);
}
.site-header__inner {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    gap: clamp(14px, 3vw, 48px);
}
.site-brand {
    display: inline-flex;
    align-items: baseline;
    gap: .2em;
    color: inherit;
    font-family: var(--libya-display);
    font-size: clamp(1.5rem, 2.8vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}
.site-brand span { color: var(--libya-accent); }
.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(12px, 2.5vw, 38px);
}
.site-nav a {
    color: var(--libya-ink);
    font-size: .91rem;
    font-weight: 620;
    text-decoration: none;
    white-space: nowrap;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-language-switcher {
    display: flex;
    align-items: center;
    gap: .35rem;
    white-space: nowrap;
}
.site-language-switcher a {
    padding: .2rem .3rem;
    color: var(--libya-muted);
    font-size: .75rem;
    font-weight: 700;
    text-decoration: none;
}
.site-language-switcher a:hover, .site-language-switcher a[aria-current="true"] { color: var(--libya-green); text-decoration: underline; }

.btn {
    display: inline-flex;
    min-height: 45px;
    justify-content: center;
    align-items: center;
    gap: .65rem;
    padding: .65rem 1.1rem;
    border: 1px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    font: inherit;
    font-size: .92rem;
    font-weight: 660;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
}
.btn-primary { color: #fffef7; background: var(--libya-green); }
.btn-primary:hover { background: var(--libya-green-deep); }
.btn-outline { border-color: var(--libya-green); color: var(--libya-green); background: transparent; }
.btn-outline:hover { background: #e8efe6; }
.btn-ghost { border-color: #ffffffa3; color: #fffef7; background: #172d2433; }
.btn-ghost:hover { background: #ffffff22; }
.libya-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }

.libya-hero {
    display: grid;
    position: relative;
    isolation: isolate;
    align-items: center;
    overflow: hidden;
    min-height: clamp(540px, 67vh, 760px);
    color: #fffef5;
    background: var(--libya-green-deep);
}
.libya-hero__photo, .libya-hero::after {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
}
.libya-hero__photo { object-fit: cover; object-position: center 55%; }
.libya-hero::after {
    z-index: -1;
    background: linear-gradient(90deg, #0a231dec 0%, #0a231db5 37%, #0a231d36 68%, #0a231d0f 100%);
    content: "";
}
.libya-hero__inner { padding-block: clamp(72px, 10vw, 132px); }
.libya-hero__copy { max-width: 600px; }
.libya-hero h1 {
    margin-bottom: .24em;
    font-size: clamp(4rem, 8.4vw, 8.3rem);
    letter-spacing: -.062em;
    line-height: .92;
}
.libya-hero h1 em { color: #efe0b7; font-weight: 400; }
.libya-hero p {
    max-width: 455px;
    margin-bottom: 1.8rem;
    color: #f8f4e8;
    font-size: clamp(1.02rem, 1.55vw, 1.2rem);
}
.libya-hero .btn-primary { color: #122c23; background: #f5e7c1; }
.libya-hero .btn-primary:hover { background: #fff7dd; }

.libya-section { padding-block: clamp(52px, 8vw, 100px); }
.libya-section--sand { background: var(--libya-sand); }
.libya-overview {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr);
    gap: clamp(24px, 7vw, 120px);
}
.libya-overview p { max-width: 65ch; color: var(--libya-muted); font-size: 1.05rem; }
.libya-overview .btn { margin-top: .4rem; }
.libya-guides {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 2rem;
}
.libya-guide {
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid var(--libya-border);
    border-radius: 9px;
    color: var(--libya-ink);
    background: var(--libya-paper);
    text-decoration: none;
}
.libya-guide:hover { border-color: var(--libya-green); }
.libya-guide h3 { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; }
.libya-guide h3 span { color: var(--libya-green); font-family: system-ui, sans-serif; font-size: .95rem; }
.libya-guide p { margin-top: .8rem; color: var(--libya-muted); }

.libya-content {
    width: min(100%, 1000px);
    margin-inline: auto;
    padding: clamp(46px, 7vw, 96px) var(--libya-gutter);
}
.libya-page-intro { margin-bottom: clamp(30px, 5vw, 52px); }
.libya-page-intro p {
    max-width: 68ch;
    margin-top: .9rem;
    color: var(--libya-muted);
    font-size: clamp(1.03rem, 2vw, 1.23rem);
}
.libya-panel {
    margin-bottom: 1.3rem;
    padding: clamp(19px, 3.4vw, 34px);
    border: 1px solid var(--libya-border);
    border-radius: 8px;
    background: var(--libya-paper);
    overflow-wrap: anywhere;
}
.libya-panel h2, .libya-steps h2 { margin-bottom: .65em; font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
.libya-panel ul, .libya-panel ol { margin: .5rem 0 0; padding-left: 1.2rem; }
.libya-panel li + li { margin-top: .55rem; }
.libya-content > .libya-actions { margin-top: 1.8rem; }
.libya-steps {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: libya-step;
}
.libya-steps > li {
    position: relative;
    padding: clamp(17px, 2.8vw, 30px) clamp(16px, 3vw, 28px) clamp(17px, 2.8vw, 30px) clamp(54px, 8vw, 94px);
    border: 1px solid var(--libya-border);
    border-radius: 7px;
    counter-increment: libya-step;
}
.libya-steps > li::before {
    position: absolute;
    top: clamp(15px, 2.9vw, 29px);
    left: clamp(14px, 3vw, 32px);
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--libya-green);
    color: var(--libya-paper);
    font-size: .85rem;
    content: counter(libya-step);
}
.libya-faq details, .libya-content details {
    padding: 1rem .2rem;
    border-bottom: 1px solid var(--libya-border);
}
.libya-content details summary { color: var(--libya-green); cursor: pointer; font-size: 1.08rem; font-weight: 650; }
.libya-content details[open] summary { margin-bottom: .65rem; }
.libya-content details p { max-width: 66ch; }

.libya-contact-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; }
.libya-form-field { min-width: 0; }
.libya-form-field--wide { grid-column: 1 / -1; }
.libya-form-field label { display: block; margin-bottom: .25rem; font-weight: 650; }
.libya-contact-form input, .libya-contact-form select, .libya-contact-form textarea {
    width: 100%;
    min-height: 44px;
    padding: .55rem .65rem;
    border: 1px solid #8e9d91;
    border-radius: 4px;
    color: var(--libya-ink);
    background: #fff;
    font: inherit;
}
.libya-contact-form textarea { min-height: 135px; resize: vertical; }
.libya-contact-form .btn { margin-top: 1.15rem; }
.libya-form-feedback {
    margin-bottom: 1rem;
    padding: .7rem .9rem;
    border-left: 3px solid var(--libya-green);
    background: #e7f1e8;
}
.libya-form-feedback--error { border-color: var(--libya-accent); background: #f7eae5; color: #682e26; }
.libya-form-field small { color: var(--libya-muted); }

.site-footer { padding-block: 44px 20px; color: #f5f2e6; background: var(--libya-green-deep); }
.site-footer__main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 2rem; }
.site-footer .site-brand span { color: #edcf9c; }
.site-footer p { max-width: 48ch; margin-top: 1rem; color: #e0e8db; font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; align-content: flex-start; gap: .7rem 1.15rem; }
.site-footer nav a { color: inherit; font-size: .9rem; }
.site-footer__end { margin-top: 1.9rem; padding-top: 1rem; border-top: 1px solid #ffffff38; color: #dee9dc; font-size: .82rem; }
.site-analytics { margin-top: .65rem; }
.site-analytics__settings { padding: .4rem 0; background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.site-analytics .btn { margin: .25rem .35rem .25rem 0; }
.site-analytics .btn-outline { color: inherit; border-color: currentColor; }

@media (max-width: 760px) {
    .site-header__inner { flex-wrap: wrap; gap: .55rem 1rem; min-height: 0; padding-block: .75rem; }
    .site-nav { order: 3; flex-basis: 100%; justify-content: flex-start; gap: .5rem 1rem; }
    .site-language-switcher { margin-inline-start: auto; }
    .site-header__action { min-height: 38px; padding: .5rem .65rem; font-size: .8rem; }
    .libya-hero { min-height: clamp(480px, 71vh, 660px); }
    .libya-hero__photo { object-position: 62% 50%; }
    .libya-hero::after { background: linear-gradient(90deg, #0a231def, #0a231d9f 61%, #0a231d4f); }
    .libya-overview, .site-footer__main { grid-template-columns: 1fr; }
    .libya-guides { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .libya-contact-fields { grid-template-columns: 1fr; }
    .libya-hero h1 { font-size: clamp(3.45rem, 15vw, 5rem); }
}

.libya-application { width: min(100%, 1380px); }
.visa-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(245px, 325px);
    grid-template-areas: 'picker summary' 'content summary';
    align-items: start;
    gap: clamp(18px, 4vw, 44px);
}
.visa-picker { grid-area: picker; margin-bottom: 0; }
.visa-route-content { grid-area: content; }
.visa-summary { grid-area: summary; }
.visa-picker label, .visa-field label { display: block; margin-bottom: .3rem; font-weight: 650; }
.visa-picker__controls { display: flex; flex-wrap: wrap; gap: .75rem; }
.visa-picker__controls select { flex: 1 1 235px; }
.visa-picker select, .visa-field input, .visa-field select, .visa-field textarea {
    width: 100%;
    min-height: 46px;
    padding: .55rem .725rem;
    border: 1px solid #87978c;
    border-radius: 5px;
    color: var(--libya-ink);
    background: #fff;
    font: inherit;
}
.visa-field textarea { resize: vertical; }
.visa-field input[type="file"] { display: block; padding: .25rem; }
.visa-field input::file-selector-button {
    margin: 0 .6rem 0 0;
    padding: .42rem .6rem;
    border: 0;
    border-radius: 3px;
    color: var(--libya-green-deep);
    background: #e8efe6;
    font: inherit;
    font-weight: 650;
}
.visa-field label span {
    margin-left: .3rem;
    color: var(--libya-muted);
    font-size: .78rem;
    font-weight: 450;
}
.visa-field small { display: block; margin-top: .3rem; color: var(--libya-muted); }
.visa-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .95rem 1.1rem;
}
.visa-field { min-width: 0; }
.visa-field--wide { grid-column: 1 / -1; }
.visa-form-access { min-width: 0; margin: 0; padding: 0; border: 0; }
.visa-form-access:disabled .visa-field :is(input, select, textarea) { background: #f7f8f2; opacity: .8; }
.visa-form-access:disabled .btn { cursor: default; opacity: .55; }
.visa-form-section { scroll-margin-top: 1rem; }
.visa-form-section h3 { margin: 1.5rem 0 .75rem; }
.visa-form-section .visa-notice { margin: 1rem 0 0; }
.visa-application [hidden] { display: none; }
.visa-notice, .visa-error {
    margin-bottom: 1.2rem;
    padding: .85rem 1.05rem;
    border: 1px solid #d7c99d;
    border-left: 4px solid #917132;
    border-radius: 5px;
    background: #f7f1df;
}
.visa-notice p { margin: .25rem 0 0; }
.visa-error { border-color: #d8a99e; border-left-color: var(--libya-accent); background: #f9ece6; }
.visa-error h2 { font-size: 1.35rem; }
.visa-error ul { margin: .45rem 0 0; padding-inline-start: 1.15rem; }
.visa-help { margin: 1rem 0; color: var(--libya-muted); font-size: .91rem; }
.visa-check { display: flex; align-items: flex-start; gap: .65rem; margin-top: .8rem; cursor: pointer; }
.visa-check input { width: 1.15rem; height: 1.15rem; margin: .23rem 0 0; accent-color: var(--libya-green); }
.visa-summary { position: sticky; top: 1.1rem; background: var(--libya-sand); }
.visa-summary h2 { margin-bottom: .2em; }
.visa-summary p { color: var(--libya-muted); }
.visa-summary h3 { margin: 1.1rem 0 .65rem; }
.visa-summary li { font-size: .91rem; }
.visa-summary__total { display: grid; padding: .8rem 0; border-block: 1px solid #b9c9b7; }
.visa-summary__total > span { font-size: .89rem; font-weight: 650; }
.visa-summary__total strong { color: var(--libya-green-deep); font-family: var(--libya-display); font-size: 2.2rem; line-height: 1.15; }
.visa-summary__total strong small { font-family: system-ui, sans-serif; font-size: .8rem; }
.visa-summary__links { display: flex; flex-wrap: wrap; gap: .4rem .85rem; margin-top: 1rem; font-size: .87rem; }
.visa-route-actions { margin-top: 1.25rem; }
.visa-receipt { max-width: 740px; }
.visa-receipt dl > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .4rem; border-bottom: 1px solid var(--libya-border); }
.visa-receipt dt { font-weight: 650; }
.visa-receipt dd { margin: 0; text-align: right; }
.visa-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 900px) {
    .visa-layout { grid-template-columns: 1fr; grid-template-areas: 'picker' 'summary' 'content'; }
    .visa-summary { position: static; margin-bottom: 0; }
}
@media (max-width: 540px) {
    .visa-fields { grid-template-columns: 1fr; }
    .visa-picker__controls .btn { width: 100%; }
}

.visa-progress {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    margin: 0 0 1.45rem;
    padding: 0;
    list-style: none;
}
.visa-progress li {
    color: var(--libya-muted);
    font-size: .87rem;
    font-weight: 650;
}
.visa-progress li + li::before { margin-right: 1rem; color: #6e7a70; content: "/"; }
.visa-progress [aria-current="step"] { color: var(--libya-green); text-decoration: underline; text-underline-offset: .25em; }
.visa-review-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(275px, 335px);
    align-items: start;
    gap: clamp(16px, 4vw, 40px);
}
.visa-review-details { margin: 0; }
.visa-review-details > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: .5rem 1.25rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--libya-border);
}
.visa-review-details > div:last-child { border-bottom: 0; }
.visa-review-details dt { color: var(--libya-muted); }
.visa-review-details dd { margin: 0; font-weight: 590; white-space: pre-wrap; }
.visa-review-actions > a, .visa-review-actions form button { width: 100%; margin-top: 1rem; }
.visa-review-actions .visa-check { margin-top: 1rem; }
.visa-check input { flex: none; }
.visa-field .visa-remove-file { display: flex; margin-bottom: 0; }
.visa-field .visa-remove-file input { width: 1.15rem; min-height: 0; padding: 0; }
.visa-checkout .visa-notice { margin-top: 1.15rem; }
@media (max-width: 800px) {
    .visa-review-layout { grid-template-columns: 1fr; }
    .visa-review-actions { position: static; }
}
@media (max-width: 480px) {
    .visa-review-details > div { grid-template-columns: 1fr; gap: 0; }
}

.libya-country-directory { width: min(100%, 1320px); }
.country-search-panel label { display: block; margin-bottom: .4rem; font-weight: 650; }
.country-search-controls { display: flex; flex-wrap: wrap; gap: .65rem; }
.country-search-controls input {
    flex: 1 1 240px;
    min-width: 0;
    min-height: 45px;
    padding: .55rem .7rem;
    border: 1px solid #87978c;
    border-radius: 5px;
    color: var(--libya-ink);
    background: #fff;
    font: inherit;
}
.country-directory-group p, .country-directory-source { color: var(--libya-muted); }
.country-directory-source { font-size: .88rem; }
.country-directory-group .country-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
    gap: .6rem;
    margin-block-start: 1.25rem;
    padding: 0;
    list-style: none;
}
.country-directory-grid .country-directory-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.75rem;
    gap: .5rem;
    margin: 0;
    padding: .5rem .7rem;
    border: 1px solid var(--libya-border);
    border-radius: 7px;
    background: #fff;
}
.country-directory-card__identity {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: .55rem;
    font-size: .94rem;
    font-weight: 620;
    line-height: 1.3;
}
.country-directory-card__action {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    max-width: 52%;
    padding: .35rem .65rem;
    border: 1px solid #a9b8ae;
    border-radius: 5px;
    background: #f4f8f5;
    color: var(--libya-green-deep);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
}
.country-directory-card__action:hover { border-color: var(--libya-green); background: #e6efe8; }
.country-directory-card__action--apply { border-color: var(--libya-green); background: var(--libya-green); color: #fff; }
.country-directory-card__action--apply:hover { border-color: var(--libya-green-deep); background: var(--libya-green-deep); }
.country-directory-card:focus-within { border-color: var(--libya-green); }
@media (max-width: 480px) {
    .country-directory-group .country-directory-grid { grid-template-columns: minmax(0, 1fr); }
}
.country-directory-grid img {
    flex: none;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px var(--libya-border);
}

.country-guide { width: min(100%, 1220px); }
.country-guide-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .7rem;
    margin: 0 0 1.9rem;
    padding: 0;
    list-style: none;
    color: var(--libya-muted);
    font-size: .87rem;
}
.country-guide-breadcrumbs li + li::before { margin-right: .7rem; content: "/"; }
.country-guide-flag { display: block; margin-bottom: .65rem; border: 1px solid var(--libya-border); border-radius: 4px; }
.country-guide-intro { max-width: 900px; }
.country-guide-intro p { max-width: 75ch; }
.country-guide-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
    gap: clamp(16px, 4vw, 40px);
    align-items: start;
}
.country-guide-section { scroll-margin-top: 1.2rem; }
.country-guide-section h3 { margin: 1.15rem 0 .45rem; }
.country-guide-summary { position: sticky; top: 1rem; background: var(--libya-sand); }
.country-guide-summary dl { margin: 0 0 1.15rem; }
.country-guide-summary dl > div { padding: .55rem 0; border-bottom: 1px solid var(--libya-border); }
.country-guide-summary dt { color: var(--libya-muted); font-size: .86rem; }
.country-guide-summary dd { margin: 0; font-weight: 650; }
.country-guide-summary > p { margin-top: .85rem; color: var(--libya-muted); font-size: .83rem; }
.country-guide-related { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin-top: 1rem; }
.country-guide-related h2 { flex-basis: 100%; font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
@media (max-width: 780px) {
    .country-guide-layout { grid-template-columns: 1fr; }
    .country-guide-summary { position: static; }
}
