:root {
    color-scheme: light;
    --ink: #0f2942;
    --accent: #00a8e8;
    --muted: #486078;
    --line: #e2e8f0;
    --accent-ink: #00648c;
    --paper: #fff;
    --backdrop: #f8fafc;
    font: 16px/1.8 system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--backdrop);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
.wrap { width: min(100% - 2rem, 74rem); margin-inline: auto; }
h1, h2, h3, p { margin-block-start: 0; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.3; }
h1 { font-size: clamp(2rem, 5vw, 4rem); margin-block-end: .75rem; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.23rem; }
a { color: #085c83; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: .18rem solid #0076a3; outline-offset: .2rem; }
.top { background: var(--paper); border-block-end: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 2rem); min-height: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; white-space: nowrap; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.2; }
.brand-mark { width: .8rem; height: .8rem; border-radius: .2rem; flex: none; background: var(--accent); transform: rotate(12deg); }
.top-links { display: flex; align-items: center; gap: 1.25rem; min-width: 0; overflow-x: auto; padding: .4rem .25rem; margin-inline-start: auto; }
.top-links a { flex: none; color: var(--ink); text-decoration: none; font-size: .875rem; }
.top-links a[aria-current], .top-links a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .16em; }
.language { margin-inline-start: auto; flex: none; border: 1px solid var(--line); padding: .2rem .65rem; border-radius: .45rem; text-decoration: none; font-weight: 700; }
.editorial {
    font-family: "Plus Jakarta Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.editorial:lang(ar) {
    font-family: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.editorial .top {
    position: sticky;
    inset-block-start: 0;
    z-index: 10;
    box-shadow: 0 2px 14px rgb(15 41 66 / .06);
}
.editorial .brand-mark {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: .5rem;
    background: var(--ink);
    transform: none;
}
.editorial .brand-mark::before {
    content: "";
    width: .88rem;
    height: .85rem;
    background:
        linear-gradient(var(--accent), var(--accent)) 0 100% / 23% 48% no-repeat,
        linear-gradient(var(--accent), var(--accent)) 50% 100% / 23% 100% no-repeat,
        linear-gradient(var(--accent), var(--accent)) 100% 100% / 23% 72% no-repeat;
}
.editorial .top-links a {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    font-weight: 650;
}
.category-short { display: none; }
.editorial .language {
    display: inline-grid;
    place-items: center;
    min-height: 2.75rem;
    margin-inline-start: 0;
    padding-inline: .8rem;
    background: #eef9ff;
    border-color: #bae6fa;
    color: var(--ink);
}
.editorial .language:hover { background: #dff4ff; border-color: var(--accent); }
.language:lang(ar) { font-family: "IBM Plex Sans Arabic", system-ui, sans-serif; }
.skip-link {
    position: fixed;
    inset-block-start: .5rem;
    inset-inline-start: .5rem;
    z-index: 11;
    color: white;
    background: var(--ink);
    padding: .55rem .9rem;
    border-radius: .4rem;
    clip-path: inset(50%);
}
.skip-link:focus { clip-path: none; }
#content { scroll-margin-block-start: 5rem; min-width: 0; }




.topic-links, .actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.topic-links { margin-block-start: 1.5rem; }
.topic-links a {
    color: #d9f5ff;
    border: 1px solid #41758f;
    padding: .4rem .85rem;
    border-radius: .45rem;
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}
.topic-links a:hover { border-color: var(--accent); background: #163b56; }
.topic-links a[aria-current] { background: #b9ecff; border-color: #b9ecff; color: var(--ink); }
.topic-links a:focus-visible { outline-color: #b9ecff; }
.listing { margin-block: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.5rem); }
.listing > h2 { margin-block-end: 1.2rem; }
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: clamp(.85rem, 2vw, 1.35rem);
}
.card, .reading, .panel { background: var(--paper); border: 1px solid var(--line); border-radius: .85rem; }
.card {
    display: flex;
    flex-direction: column;
    align-items: start;
    padding: clamp(1rem, 2vw, 1.5rem);
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .7rem;
    color: var(--muted);
    font-size: .875rem;
}
.category {
    color: var(--accent-ink);
    background: #eaf8fe;
    border-radius: .35rem;
    padding: .15rem .5rem;
    font-weight: 700;
    text-decoration: none;
}
.category:hover { text-decoration: underline; }
.card h3 { margin-block: .85rem .45rem; }
.card p { color: var(--muted); margin-block-end: 1rem; }
.read-link {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 2.75rem;
    margin-block-start: auto;
    color: var(--accent-ink);
    font-size: .925rem;
    font-weight: 700;
    text-decoration: none;
}
.read-link:hover { text-decoration: underline; }
.read-link span { color: #007ba9; }
.reading, .bottom-ad, .breadcrumbs { width: 100%; max-width: 800px; margin-inline: auto; }
.reading {
    padding: clamp(1.15rem, 4.5vw, 3rem);
    margin-block-end: 2rem;
    font-size: 1.06rem;
    line-height: 1.82;
}
.reading h1 { font-size: clamp(1.85rem, 4vw, 3.12rem); text-wrap: balance; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-block: 1.65rem .9rem; font-size: .875rem; }
.intro { color: var(--muted); font-size: 1.15rem; margin-block-end: .8rem; }
.date { display: flex; flex-wrap: wrap; gap: .45rem 1.15rem; color: var(--muted); font-size: .875rem; }
.answer {
    background: #effaff;
    border: 1px solid #caeaf8;
    border-inline-start: .3rem solid var(--accent);
    padding: 1.15rem 1.3rem;
    margin-block: 1.85rem 2rem;
    border-radius: .55rem;
}
.answer h2 { font-size: 1.16rem; margin-block-end: .35rem; }
.answer p { margin-block-end: 0; }
.article-body h2, .article-body h3 { margin-block: 1.55em .65em; }
.article-body p { margin-block-end: 1.25em; }
.article-body { overflow-wrap: anywhere; }
.article-body blockquote {
    margin-block:1rem 1.25rem;
    margin-inline:0;
    padding:.75rem 1rem;
    border-inline-start:.2rem solid var(--accent-ink);
    background:var(--accent-soft);
}
.article-body blockquote > :last-child { margin-block-end:0; }
.article-body pre, .table-scroll { overflow: auto; }
.article-table {
    overflow-x: auto;
    margin-block: 1.5rem;
    border: 1px solid var(--line);
    border-radius: .6rem;
    background: var(--paper);
    box-shadow: var(--depth);
}
.article-table table { min-width: 27rem; margin: 0; }
.article-table caption { padding: .7rem 1rem; font-weight: 700; text-align: start; }
.article-table tbody tr:nth-child(even) { background: var(--backdrop); }
.article-table tbody th { background: transparent; }
table { width: 100%; border-collapse: collapse; margin-block: 1rem; }
th, td { border: 1px solid var(--line); padding: .7rem .9rem; text-align: start; vertical-align: top; }
th { background: #eef5fa; }
.editorial .article-table thead th { background: var(--backdrop); }
.faq { margin-block-start: 2.25rem; }
.faq details { border-block-start: 1px solid var(--line); padding-block: .85rem; }
.faq details:last-child { border-block-end: 1px solid var(--line); }
.faq details p { margin-block: .55rem 0; }
.faq summary { cursor: pointer; }
.faq summary::marker { color: var(--accent-ink); }
.faq summary h3 { display: inline; font-size: 1.03rem; }
.ad {
    min-height: 280px;
    margin-block: clamp(2.5rem, 6vw, 4rem);
    display: flow-root;
    position: relative;
    isolation: isolate;
}
.ad ins { max-width: 100%; }
.related { border-block-start: 1px solid var(--line); padding-block-start: 1.5rem; }
.policy { margin-block-start: 2rem; }
.footer { background: var(--paper); border-block-start: 1px solid var(--line); }
.footer-inner { padding-block: 1.65rem; font-size: .9375rem; }
.footer-inner nav { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px; }
.footer-inner nav a { color: var(--ink); font-weight: 600; }
.copyright { color: var(--muted); margin-block: 1.2rem 0; padding-block-start: 1rem; border-block-start: 1px solid var(--line); text-align: left; }
:dir(rtl) .copyright { text-align: right; }
.admin { margin-block: 2rem; }
.admin h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.panel { padding: clamp(1rem, 3vw, 2rem); margin-block: 1rem; }
.login { max-width: 32rem; }
label { display: grid; gap: .2rem; margin-block-end: .85rem; font-weight: 650; }
input, select, textarea, button { font: inherit; }
input, select, textarea { min-width: 0; max-width: 100%; width: 100%; padding: .4rem .55rem; background: white; color: var(--ink); border: 1px solid #859caf; border-radius: .35rem; font-weight: 400; }
textarea { resize: vertical; }
button, .button { display: inline-block; border-radius: .4rem; border: 1px solid var(--ink); color: white; background: var(--ink); padding: .35rem .8rem; cursor: pointer; text-decoration: none; }
button:disabled { opacity: .55; cursor: wait; }
.secondary { color: var(--ink); background: white; }
button.danger, .error { color: #9e2534; }
button.danger { background: white; border-color: #c67580; }
.error { background: #fff0f2; padding: .5rem .75rem; border-radius: .3rem; }
#generator-status:empty { display: none; }
#generator-status { margin-block: 1rem 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 15rem),1fr)); gap: 0 1rem; }
.editor { min-width: 0; border: 1px solid var(--line); border-radius: .4rem; margin: 0 0 1rem; }
@media (max-width: 42rem) {
    .top-inner { min-height: 3.7rem; gap: .5rem; }
    .brand { white-space: normal; flex: 0 1 auto; font-size: .87rem; }
    .top-links { gap: .75rem; }
    .top-links a { font-size: .8rem; }
    .language { font-size: .85rem; }

}

@media (max-width: 58rem) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 42rem) {
    .editorial .brand { flex: none; }
    .editorial .top-links { margin-inline-start: 0; padding-inline: .2rem; gap: .6rem; }
    .editorial .language { margin-inline-start: auto; }
    .category-full { display: none; }
    .category-short { display: inline; }
}
@media (max-width: 34rem) {
    .cards { grid-template-columns: minmax(0, 1fr); }
    .editorial .brand-name {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
}

.humanizer-option {
    display: flex;
    align-items: baseline;
    gap: .55rem;
}
.humanizer-option input { width: auto; accent-color: var(--accent-ink); }
.polish-status { margin-block: .55rem 0; }
.polish-status:empty { display: none; }

/* Portal surfaces and interactions */
.editorial {
    --depth: 0 10px 28px rgb(15 41 66 / .075), 0 4px 16px rgb(0 168 232 / .06);
}
.editorial .top-inner { position: relative; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}




.guide-search {
    display: flex;
    align-items: stretch;
    gap: .35rem;
    padding: .32rem;
    margin-block-start: 1.2rem;
    max-width: 35rem;
    border: 1px solid #7d9eb5;
    border-radius: .6rem;
    background: #fff;
}
.guide-search input { border: 0; padding: .45rem .6rem; }
.guide-search button { background: #b9ecff; color: var(--ink); border-color: transparent; font-weight: 700; }
.guide-search button:hover { background: #8cddfb; }


.guide-art {
    --art-light: #c6eafa;
    --art-dark: #639dbf;
    --art-ink: #21618b;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 24% 23%, rgb(255 255 255 / .86) 0 8%, transparent 8.5%),
        linear-gradient(155deg, var(--art-light) 5%, var(--art-dark) 100%);
}
.guide-art[data-topic="dubai-living"] { --art-light: #d8f3ff; --art-dark: #73bad8; --art-ink: #236a8c; }
.guide-art[data-topic="visas-residency"] { --art-light: #e1edfa; --art-dark: #8aaed4; --art-ink: #3c6596; }
.guide-art[data-topic="business-ideas"] { --art-light: #d7e9f5; --art-dark: #729dbb; --art-ink: #244e70; }
.guide-art span {
    position: absolute;
    inset: 21% 10% 0;
    opacity: .9;
    background: linear-gradient(150deg, var(--art-ink), var(--art-dark));
    clip-path: polygon(0 100%, 0 80%, 11% 80%, 11% 52%, 23% 52%, 23% 65%, 34% 65%, 34% 42%, 44% 42%, 44% 22%, 51% 22%, 51% 5%, 53% 0, 55% 5%, 55% 22%, 62% 22%, 62% 45%, 72% 45%, 72% 64%, 83% 64%, 83% 43%, 94% 50%, 94% 78%, 100% 78%, 100% 100%);
}
.guide-art[data-topic="dubai-living"] span {
    clip-path: polygon(0 100%, 0 65%, 16% 48%, 32% 65%, 32% 78%, 44% 78%, 44% 46%, 60% 24%, 76% 46%, 76% 68%, 87% 57%, 100% 70%, 100% 100%);
}
.guide-art[data-topic="visas-residency"] span {
    inset: 16% 28% 0;
    clip-path: polygon(0 100%, 0 0, 70% 0, 100% 24%, 100% 100%);
    background:
        linear-gradient(rgb(255 255 255 / .7), rgb(255 255 255 / .7)) 25% 53% / 51% 4% no-repeat,
        linear-gradient(rgb(255 255 255 / .7), rgb(255 255 255 / .7)) 25% 69% / 63% 4% no-repeat,
        linear-gradient(150deg, var(--art-ink), var(--art-dark));
}
.guide-art[data-topic="business-ideas"] span {
    clip-path: polygon(0 100%, 0 77%, 20% 77%, 20% 100%, 27% 100%, 27% 55%, 47% 55%, 47% 100%, 54% 100%, 54% 30%, 74% 30%, 74% 100%, 80% 100%, 80% 6%, 100% 6%, 100% 100%);
}
.card {
    display: grid;
    grid-template-rows: auto 1fr;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    box-shadow: var(--depth);
}
.card > .guide-art { aspect-ratio: 16 / 9; }
.card-copy { display: flex; flex-direction: column; align-items: start; min-width: 0; padding: clamp(1rem, 2vw, 1.5rem); }
.featured-guide { margin-block-end: 2.2rem; }
.card[data-featured] { grid-template: 1fr / 1.05fr 1fr; }
.card[data-featured] .guide-art { aspect-ratio: 16 / 9; min-height: 100%; }
.card[data-featured] .card-copy { justify-content: center; padding: clamp(1.2rem, 4vw, 2.5rem); }
.card[data-featured] h3 { font-size: clamp(1.3rem, 3vw, 2rem); }
.card[data-featured] .read-link { margin-block-start: 0; }
.card .lead-label { font-size: .9rem; color: var(--accent-ink); font-weight: 700; margin-block-end: .6rem; }
#guide-results h2 { margin-block-end: 1rem; }
.reading-progress {
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(var(--reading, 0));
    transform-origin: left;
    pointer-events: none;
}
:dir(rtl) .reading-progress { transform-origin: right; }
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 780px) minmax(300px, 19rem);
    justify-content: center;
    gap: clamp(1.15rem, 4vw, 2.5rem);
}
.article-layout .reading { max-width: 780px; min-width: 0; box-shadow: var(--depth); }
.guide-sidebar { min-width: 0; }
.sidebar-links { position: sticky; inset-block-start: 5.5rem; max-height: calc(100dvh - 6rem); overflow-y: auto; }
.sidebar-panel {
    padding: .9rem 1.05rem;
    margin-block-end: .8rem;
    border: 1px solid var(--line);
    border-radius: .7rem;
    background: var(--paper);
}
.sidebar-panel h2 { font-size: 1rem; margin-block-end: .4rem; }
.sidebar-panel ul, .sidebar-panel ol { margin: 0; padding: 0; list-style: none; }
.sidebar-panel li + li { border-block-start: 1px solid var(--line); }
.sidebar-panel li.h3 { padding-inline-start: .65rem; }
.sidebar-panel a { display: block; padding-block: .45rem; font-size: .9rem; }
.article-body [id], #guide-faq { scroll-margin-block-start: 5.5rem; }
.editorial .ad { animation: none; transform: none; transition: none; }
.sidebar-ad { margin-block: 0 3rem; padding-block: .5rem; min-height: 300px; }
.footer-columns { display: grid; grid-template-columns: 1fr 2fr auto; align-items: start; gap: 1.15rem 1.5rem; }
.footer-columns nav { gap: 18px 24px; }

@media (max-width: 58rem) {
    .article-layout { display: block; }
    .guide-sidebar { max-width: 780px; margin-inline: auto; }
    .sidebar-links { position: static; max-height: none; overflow: visible; }
    .footer-columns { grid-template-columns: 1fr 2fr; }
    .footer-columns nav:last-child { grid-column: 2; }
}
@media (max-width: 42rem) {

    .card[data-featured] { grid-template: auto 1fr / 1fr; }
    .footer-columns { grid-template-columns: 1fr; }
    .footer-columns nav:last-child { grid-column: auto; }
}

.footer .footer-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .95rem 1.6rem;
    margin-block-end: 1.7rem;
    padding: clamp(1rem, 2.5vw, 1.65rem);
    border: 1px solid #d4eaf5;
    border-radius: .95rem;
    background: linear-gradient(120deg, #eef9ff, #f8fafc 75%);
    box-shadow: var(--depth);
}
.footer-highlight:dir(rtl) { background: linear-gradient(240deg, #eef9ff, #f8fafc 75%); }
.footer-highlight p {
    flex: 1 1 18rem;
    margin-block-end: 0;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 650;
}
.footer-cta {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .4rem .85rem;
    border-radius: .5rem;
    background: var(--ink);
    color: white;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
}
.footer-cta:hover { background: #174464; text-decoration: underline; }
.copyright, :dir(rtl) .copyright { text-align: start; }
.portal-copy-panel .copy-language {
    padding: .7rem 1rem;
    margin-block-end: .75rem;
    border: 1px solid var(--line);
    border-radius: .6rem;
}
.copy-language form { margin-block-start: .7rem; }
.copy-group summary { margin-block-end: .5rem; }
.copy-language button { margin-block-start: .65rem; }

/* Shared newsroom identity */
.editorial .top { background: #fff; }




.guide-art img, .article-cover {
    display:block; width:100%; height:100%; object-fit:cover;
}
.site-logo { width:2.25rem; height:2.25rem; flex:none; object-fit:contain; }
.article-cover { aspect-ratio:16 / 9; height:auto; border-radius:.65rem; margin-block:1rem; background:var(--accent-soft); }
.article-body img { display:block; max-width:100%; height:auto; border-radius:.55rem; margin-block:1rem; }
.topic-catalog { margin-block:1.25rem 2rem; }
.topic-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.75rem; }
.topic-card {
    display:grid; grid-template-columns:3rem minmax(0,1fr); gap:.65rem; align-items:center;
    min-width:0; padding:.65rem; border:1px solid var(--line); border-radius:.65rem;
    background:var(--paper); color:var(--ink); text-decoration:none;
}
.topic-card .guide-art { aspect-ratio:1; border-radius:.4rem; }
.topic-copy b, .topic-copy small { display:block; overflow-wrap:anywhere; }
.topic-copy small { color:var(--muted); line-height:1.4; }
.editorial .footer .footer-inner { padding-block:2rem 1rem; }
.footer-highlight img { width:clamp(5rem,12vw,10rem); aspect-ratio:1.8; object-fit:cover; border-radius:.45rem; }
.editorial .footer-columns { grid-template-columns:minmax(0,1.5fr) repeat(3,minmax(0,1fr)); }
.editorial .footer-columns nav { grid-column:auto; display:grid; justify-items:start; gap:.4rem; }
.editorial .footer-columns h2 { margin-block-end:.4rem; font-size:.95rem; }
.editorial .footer-columns nav { display:grid; gap:.45rem; align-items:start; }
@media(max-width:58rem) {
    .topic-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .editorial .footer-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .editorial .footer-columns nav:last-child { grid-column:auto; }
}
@media(max-width:42rem) {


}
@media(max-width:42rem) {
    .editorial .footer-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:27rem) {
    .topic-card { grid-template-columns:minmax(0,1fr); }
    .topic-card .guide-art { aspect-ratio:2.3; }
    .editorial .footer-columns .footer-about { grid-column:1 / -1; }
}

/* Editorial front page and restrained depth */

.editorial .topic-card {
    border-radius:.5rem;
    box-shadow:var(--depth);
}
.editorial .listing h2 { letter-spacing:-.025em; }
.mobile-contents { display:none; }

@media (max-width:58rem) {
    .mobile-contents {
        display:block;
        border:1px solid var(--line);
        border-radius:.55rem;
        margin-block:1.2rem;
        padding:.65rem .85rem;
    }
    .mobile-contents ol { margin-block:.5rem 0; padding-inline-start:1.2rem; }
    .mobile-contents li.h3 { margin-inline-start:.75rem; }
    .guide-sidebar .sidebar-panel[aria-labelledby="toc-heading"] { display:none; }
}

/* Magazine edition */
.editorial {
    --accent-soft: #eaf7ff;
    --accent-line: #b9e2f5;
    --depth: 0 10px 24px rgb(15 41 66 / .055);
    color:var(--ink);
    background:var(--backdrop);
}
.editorial .top { background:var(--paper); box-shadow:none; }
.editorial a { color:var(--accent-ink); }
.editorial .brand { color:var(--ink); }
.editorial .top-links a { color:var(--ink); }
.editorial .language {
    font-size:.875rem;
    border-color:var(--line);
    background:transparent;
    color:var(--ink);
}
.editorial .language:hover { background:var(--accent-soft); border-color:var(--accent-line); }
.editorial h1, .editorial h2 { font-weight:700; }
.editorial h3 { font-weight:600; }
.journal-masthead {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    align-items:end;
    gap:.75rem 2rem;
    padding-block:clamp(1.6rem,4vw,3.4rem) 1.35rem;
}
.journal-masthead.has-banner { grid-template-columns:minmax(0,1fr) auto; }
.journal-intro {
    grid-column:1;
    display:grid;
    grid-template-columns:minmax(0, 1.5fr) minmax(14rem, .75fr);
    align-items:end;
    gap:.7rem 2rem;
}
.journal-intro h1 {
    font-size:clamp(2.4rem,4.85vw,4.45rem);
    line-height:1.12;
    letter-spacing:-.035em;
    max-width:20ch;
    margin:0;
}
.editorial:lang(ar) .journal-intro h1 { line-height:1.28; letter-spacing:normal; }
.journal-heading > p:not(.hero-eyebrow) {
    margin-block-start:.55rem;
    color:var(--muted);
    max-width:58ch;
    margin-block-end:0;
}
.journal-intro .hero-eyebrow {
    color:var(--accent-ink);
    font-size:.9rem;
    font-weight:700;
    margin:0;
}
.journal-mini {
    align-self:stretch;
    margin:0;
    width:clamp(7rem,16vw,12rem);
    min-height:6rem;
}
.journal-mini img, .guide-art img {
    display:block;
    object-fit:cover;
    width:100%;
    height:100%;
    max-height:100%;
}
.journal-mini img { border-radius:.4rem; aspect-ratio:1.5; }
.editorial .guide-search { border-color:#bdcedc; border-radius:.35rem; background:var(--paper); }
.editorial .guide-search button { background:var(--ink); color:white; border-radius:.25rem; font-weight:700; }
.editorial .guide-search button:hover { background:#234e73; }
.editorial .topic-links {
    border-block:1px solid var(--line);
    margin-block:0;
    padding-block:.45rem;
    gap:.3rem .55rem;
}
.editorial .topic-links a {
    border:1px solid transparent;
    border-radius:.3rem;
    background:transparent;
    color:var(--ink);
}
.editorial .topic-links a[aria-current] {
    border-color:var(--accent-line);
    color:var(--ink);
    background:var(--accent-soft);
}
.editorial .topic-links a:focus-visible { outline-color:var(--accent-ink); }
.editorial #guide-results { margin-block:clamp(1.3rem,3vw,2.1rem) clamp(2.6rem,6vw,4rem); }
.edition-grid {
    display:grid;
    grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);
    align-items:start;
    column-gap:clamp(1rem,3vw,2.25rem);
    row-gap:1.4rem;
}
.editorial .edition-section-title {
    border-block-end:1px solid var(--line);
    margin-block-end:.8rem;
    padding-block-end:.62rem;
    font-size:clamp(1.06rem,2vw,1.35rem);
    line-height:1.4;
    letter-spacing:normal;
}
.edition-section-title::before {
    content:"";
    display:inline-block;
    margin-inline-end:.45rem;
    border-radius:50%;
    width:.48rem;
    height:.48rem;
    background:var(--accent);
    vertical-align:.15em;
}
.edition-archive + .edition-archive, .edition-grid + .edition-archive { margin-block-start:2.25rem; }
.editorial .card { border-radius:.4rem; box-shadow:var(--depth); }
.editorial .card h3 { line-height:1.32; font-size:clamp(1.15rem,2vw,1.45rem); }
.editorial .card h3 a { color:var(--ink); text-decoration:none; }
.editorial .card h3 a:hover { text-decoration:underline; }
.editorial .card[data-featured] {
    display:grid;
    grid-template: auto 1fr / minmax(0,1fr);
    overflow:hidden;
}
.editorial .card[data-featured] .guide-art {
    aspect-ratio:16 / 9;
    min-height:0;
    background:var(--accent-soft);
}
.editorial .card[data-featured] .guide-art img { object-fit:cover; object-position:50% 45%; }
.editorial .card[data-featured] .card-copy { padding:clamp(1rem,2.5vw,1.42rem); }
.editorial .card[data-featured] h3 { font-size:clamp(1.55rem,3.1vw,2.35rem); text-wrap:balance; }
.editorial .card[data-featured] p { margin-block-end:.3rem; }
.editorial .card .category {
    background:var(--accent-soft);
    color:var(--accent-ink);
    font-size:.8rem;
}
.editorial .edition-digest .cards {
    grid-template-columns:minmax(0,1fr);
    grid-auto-rows:auto;
    gap:0;
}
.editorial .edition-digest .card {
    grid-template:minmax(0,1fr) / clamp(5.3rem,9vw,7.4rem) minmax(0,1fr);
    gap:.78rem;
    align-items:center;
    border:0;
    border-block-end:1px solid var(--line);
    border-radius:0;
    background:transparent;
    padding-block:.8rem;
    box-shadow:none;
}
.editorial .edition-digest .card:first-child { padding-block-start:0; }
.editorial .edition-digest .guide-art { border-radius:.32rem; aspect-ratio:1.14; }
.editorial .edition-digest .card-copy { padding:0; }
.editorial .edition-digest .card-meta { font-size:.8rem; gap:.1rem .5rem; }
.editorial .edition-digest .card h3 { margin-block:.3rem .22rem; }
.editorial .edition-digest .card p {
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    margin:0;
    font-size:.875rem;
    line-height:1.48;
}
.editorial .edition-digest .read-link { display:none; }
.editorial .topic-catalog { margin-block:0 clamp(2.25rem,6vw,4rem); }
.editorial .topic-card { border-color:var(--line); box-shadow:none; }
.editorial .topic-card .topic-copy { color:var(--ink); }
.editorial .journal-article {
    border:0;
    background:transparent;
    box-shadow:none;
    padding-block-start:.5rem;
}
.journal-article > h1 { text-wrap:balance; font-size:clamp(2.1rem,4.2vw,3.35rem); line-height:1.2; }
.editorial .answer { border-color:var(--accent-line); border-inline-start-color:var(--accent); background:var(--accent-soft); }
.editorial .sidebar-panel { background:var(--paper); border-radius:.4rem; }
.editorial .reading-progress { background:var(--accent); }
@media (max-width:60rem) {
    .journal-intro { grid-template-columns:minmax(0,1.2fr) minmax(13rem,.8fr); }
    .journal-masthead { column-gap:.8rem; }
}
@media (max-width:48rem) {
    .journal-masthead { align-items:start; padding-block:1.3rem 1rem; }
    .journal-intro { grid-template-columns:minmax(0,1fr); gap:.62rem; }
    .journal-intro h1 { font-size:clamp(2.15rem,8.3vw,3.05rem); }
    .journal-mini { width:min(16vw,6rem); min-height:auto; }
    .edition-grid { grid-template-columns:minmax(0,1fr); }
    .editorial .journal-article { padding-inline:.3rem; }
}
@media (max-width:27rem) {
    .editorial .topic-links {
        flex-wrap:nowrap;
        overflow-x:auto;
        padding-inline:.15rem;
    }
    .editorial .topic-links a { flex:none; white-space:nowrap; padding-inline:.48rem; }
    .editorial .edition-digest .card { grid-template-columns:5rem minmax(0,1fr); }
    .editorial .edition-digest .card p { -webkit-line-clamp:1; }
}

.article-meta { align-items:center; gap:.3rem .65rem; margin-block:.65rem 1rem; }
.article-reading-time, .article-updated { display:inline-flex; align-items:center; gap:.45rem; }
.article-meta-divider, .article-reading-time .share-icon { color:var(--accent-ink); }
.article-meta .guide-updated { font-size:inherit; }
.article-share {
    display:flex; align-items:center; flex-wrap:wrap; gap:.55rem;
    margin-block-end:1.15rem; padding:.85rem;
    background:var(--backdrop); border:1px solid var(--line); border-radius:.8rem;
    box-shadow:var(--depth);
}
.share-heading {
    flex-basis:100%; min-width:0; display:flex; align-items:baseline;
    justify-content:space-between; gap:.25rem .8rem; flex-wrap:wrap;
}
.share-heading h2 { margin:0; font-size:1rem; line-height:1.5; }
.share-heading [role="status"] { color:var(--accent-ink); font-size:.84rem; font-weight:600; }
.article-share :is(button,[data-share-channel]) {
    display:inline-flex; align-items:center; justify-content:center; gap:.45rem;
    min-height:2.75rem; padding:.36rem .72rem;
    background:var(--paper); color:var(--ink);
    border:1px solid var(--line); border-radius:.56rem; box-shadow:var(--control-depth);
    font-size:.86rem; font-weight:600; line-height:1.3; text-decoration:none;
}
.share-icon { flex:none; vertical-align:middle; }
.article-share .share-icon { color:var(--accent-ink); }
.article-share [data-copy-link] {
    background:var(--ink); color:var(--paper); border-color:var(--ink);
    box-shadow:var(--control-depth);
}
.article-share [data-copy-link] .share-icon { color:#78d9fb; }
.article-share [hidden] { display:none; }
[data-theme] .article-share button[hidden] { display:inline-flex; visibility:hidden; }
.article-share [data-share-input] { flex-basis:100%; }
.article-takeaways,.career-resource {
    margin-block:1.3rem 1.65rem;
    padding:.9rem 1.1rem;
    border:1px solid var(--line);
    border-radius:.45rem;
    background:var(--paper);
}
.article-takeaways h2,.career-resource h2 { font-size:1.15rem; margin-block-end:.4rem; }
.article-takeaways ul { padding-inline-start:1.25rem; margin-block:.4rem 0; }
.article-takeaways li + li { margin-block-start:.45rem; }
.career-resource p { margin-block-end:.45rem; }
.career-resource a { font-weight:700; }

/* Article pathways and local estimator */
.guide-updated { color:var(--muted); font-size:.82rem; }
.card-meta .guide-updated { display:block; flex-basis:100%; }
.guide-type {
    display:inline-block;
    padding:.1rem .45rem;
    border-radius:.3rem;
    background:var(--accent-soft);
    color:var(--accent-ink);
    font-size:.82rem;
    font-weight:700;
}
.guide-type.type-mistakes { background:#e9eef7; color:#324e73; }
.salary-panel,.next-logical-step {
    margin-block:2rem;
    padding:clamp(.9rem,2.5vw,1.4rem);
    border:1px solid var(--line);
    border-radius:.5rem;
    background:var(--paper);
}
.salary-panel { scroll-margin-block-start:5rem; }
.salary-panel h2,.next-logical-step h2 { margin-block-end:.45rem; font-size:1.16rem; }
.salary-panel p,.next-logical-step p { color:var(--muted); }
[data-theme] :is(.salary-controls,.salary-results), :is(.salary-controls,.salary-results):not([hidden]) {
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));
    gap:.55rem .8rem;
}
[data-theme] :is(.salary-controls,.salary-results)[hidden] { visibility:hidden; }
.salary-controls { align-items:end; }
@media (max-width:42rem) {
    .salary-controls label:last-child { grid-column:1 / -1; }
}
.salary-controls input,.salary-controls select { background:var(--paper); border-color:#bdcedc; }
.salary-controls input:invalid { border-color:#a63634; }
.salary-results { margin-block:.65rem 0; }
.salary-results > div {
    min-width:0;
    padding:.48rem .65rem;
    border-radius:.35rem;
    background:var(--backdrop);
}
.salary-results dt { font-size:.9rem; }
.salary-results dd { margin:0; font-weight:700; overflow-wrap:anywhere; }
.salary-results .salary-balance { background:var(--accent-soft); color:var(--ink); }
.salary-results[data-negative] .salary-balance { background:#f5e5e1; color:#8a362d; }
.next-logical-step {
    margin-inline:auto;
    max-width:780px;
    border-inline-start:.24rem solid var(--accent);
}
.next-logical-step .next-topic { font-size:.86rem; font-weight:700; margin-block-end:.25rem; }
.next-logical-step h3 { margin-block-end:.35rem; }
.next-logical-step a { font-weight:700; }

.brand-wordmark { min-width: 0; overflow-wrap: anywhere; }
.brand-wordmark small { display: block; margin-block-start: .25rem; font-size: .82rem; font-weight: 500; line-height: 1.45; white-space: normal; }
.editorial .footer .footer-brand { white-space: normal; }
.editorial .footer-about p { margin-block:.65rem 0; max-inline-size:38ch; color:var(--footer-muted); line-height:1.65; }
.editorial .footer .footer-cta { background: var(--brand-accent,#00a8e8); color: var(--brand-on-accent,#000); }

.property-estimate {
    margin-block: 1rem;
    padding: .8rem 1rem;
    border: 1px solid var(--line);
    border-inline-start: .2rem solid var(--accent);
    border-radius: .45rem;
    background: var(--paper);
    font-size: .92rem;
}
.property-estimate p { margin: .3rem 0 0; }
.article-table caption { padding: .75rem .85rem; text-align: start; font-weight: 600; }
.guide-art[data-topic="real-estate-news"] span {
    clip-path: polygon(0 100%,0 50%,13% 50%,13% 30%,34% 30%,34% 100%,39% 100%,39% 20%,52% 5%,65% 20%,65% 100%,71% 100%,71% 42%,94% 42%,94% 65%,100% 65%,100% 100%);
}


.editorial .ad { inset:auto; clear:both; width:100%; min-width:0; }
.editorial .managed-ad-unit { display:block; width:100%; height:280px; }
.editorial .sidebar-ad .managed-ad-unit { height:300px; }

/* Editorial surfaces */
.editorial {
    --depth: 0 1px 2px rgb(15 41 66 / .045), 0 4px 12px rgb(15 41 66 / .035);
    --control-depth: 0 1px 2px rgb(15 41 66 / .06);
    --hover-depth: 0 2px 4px rgb(15 41 66 / .06), 0 6px 14px rgb(15 41 66 / .07);
    --surface-radius: .95rem;
}
.editorial .wrap { width:min(100% - clamp(1.75rem,5vw,4rem),76rem); }
.editorial .top-inner { gap:clamp(.45rem,1.2vw,1.15rem); min-height:4.3rem; }
.editorial .brand { font-weight:700; }
.editorial .top-links { gap:clamp(.55rem,1.3vw,1.05rem); }
.editorial .top-links a { font-weight:600; }
.editorial .top-links a[aria-current] { color:var(--accent-ink); }
.header-information { position:relative; flex:none; }
.header-information summary {
    color:var(--ink); cursor:pointer; font-size:.86rem; font-weight:600;
    border:1px solid var(--line); border-radius:.55rem; padding:.32rem .62rem;
}
.header-information[open] summary { background:var(--accent-soft); }
.header-information-links {
    position:absolute; inset-inline-end:0; inset-block-start:calc(100% + .5rem);
    display:grid; gap:.15rem; min-width:10rem; padding:.4rem;
    border:1px solid var(--line); border-radius:.7rem; background:var(--paper); box-shadow:var(--depth);
}
.header-information-links a { padding:.42rem .55rem; border-radius:.4rem; text-decoration:none; font-size:.87rem; font-weight:600; }
.header-information-links a:is(:focus-visible,[aria-current]) { background:var(--accent-soft); }
.discovery-panel {
    margin-block-start:clamp(1.15rem,3vw,2.3rem); border:1px solid var(--line);
    border-radius:calc(var(--surface-radius) + .2rem); box-shadow:var(--depth); background:var(--paper);
}
.discovery-panel .journal-masthead {
    border-radius:calc(var(--surface-radius) + .2rem) calc(var(--surface-radius) + .2rem) 0 0;
    padding:clamp(1.3rem,3.7vw,3rem);
    background:linear-gradient(160deg,var(--paper),var(--backdrop));
}
.discovery-panel .journal-intro {
    grid-template-columns:minmax(0,1fr); align-items:start; align-self:center; gap:clamp(.85rem,2vw,1.4rem);
}
.discovery-panel .journal-masthead.has-banner { grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); column-gap:clamp(1.25rem,4vw,3.75rem); }
.discovery-panel .journal-mini {
    margin:0; align-self:center; width:100%; min-height:0;
    border-radius:.8rem; background:var(--accent-soft); box-shadow:var(--depth);
}
.discovery-panel .journal-mini img { height:auto; aspect-ratio:16/9; border-radius:inherit; object-position:50% 53%; }
.journal-intro h1 { font-size:clamp(2rem,4.15vw,3.8rem); letter-spacing:-.033em; text-wrap:balance; }
.journal-heading > p:not(.hero-eyebrow) { line-height:1.75; margin-block-start:.7rem; }
.editorial:lang(ar) :is(.edition-section-title,.journal-article > h1) { letter-spacing:normal; }
.journal-intro .hero-eyebrow { font-weight:700; margin-block-end:.4rem; }
.editorial .guide-search { padding:.28rem; border-color:#c5d5e3; border-radius:.7rem; box-shadow:var(--depth); }
.editorial .guide-search input { padding-inline:.8rem; }
.editorial .guide-search button { border-radius:.48rem; white-space:nowrap; min-height:2.65rem; padding-inline:1rem; font-weight:600; }
.editorial .discovery-panel .topic-links {
    flex-wrap:nowrap; overflow-x:auto; border-block-end:0;
    padding:.75rem clamp(.8rem,1.4vw,1.25rem); gap:.4rem;
}
.editorial .discovery-panel .topic-links a {
    display:inline-flex; flex:1 0 auto; align-items:center; justify-content:center; gap:.45rem; min-height:2.45rem;
    border-radius:999px; border-color:var(--line); padding:.32rem clamp(.45rem,.7vw,.62rem); font-weight:600;
    white-space:nowrap; background:var(--paper); box-shadow:var(--control-depth);
}
.editorial .discovery-panel .topic-links a[aria-current] {
    border-color:var(--ink); background:var(--ink); color:var(--paper);
}
.editorial .discovery-panel .topic-links .salary-jump { color:var(--accent-ink); background:var(--accent-soft); border-color:var(--accent-line); }
@media (min-width:64rem) {
    .editorial .discovery-panel .topic-links { align-items:stretch; }
    .editorial .discovery-panel .topic-links a {
        flex-shrink:1; min-inline-size:0; white-space:normal; text-align:center;
    }
}
.edition-grid { grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); align-items:start; }
.editorial .edition-section-title { border:0; padding:0; margin-block-end:.9rem; font-weight:700; }

.editorial .edition-section-title { display:flex; align-items:center; gap:.65rem; }
.editorial .edition-section-title::before { margin:0; width:.34rem; height:.95rem; border-radius:.2rem; }
.editorial .edition-section-title::after { content:""; flex:1; height:1px; background:var(--line); }
.editorial .card, .editorial .topic-card, .editorial .sidebar-panel { border-radius:var(--surface-radius); }
.editorial .edition-digest .cards {
    border:1px solid var(--line); border-radius:var(--surface-radius);
    background:var(--paper); box-shadow:var(--depth); padding-inline:clamp(.8rem,1.7vw,1.1rem);
}
.editorial .edition-digest .card, .editorial .edition-digest .card:first-child { padding-block:clamp(.8rem,1.7vw,1.2rem); }
.editorial .edition-digest .card:last-child { border-block-end:0; }
.editorial .edition-digest .guide-art { aspect-ratio:16/10; border-radius:.55rem; }
.editorial .edition-digest .card-meta { gap:.2rem .5rem; line-height:1.45; }
.editorial .card .category { border-radius:999px; line-height:1.5; font-weight:600; }
.editorial .edition-digest .card h3 { margin-block:.38rem .26rem; }
.editorial .edition-digest .card h3 { font-size:clamp(.98rem,1.65vw,1.26rem); }
.editorial .card[data-featured] h3 { font-size:clamp(1.48rem,2.9vw,2.15rem); }
.editorial .topic-card { padding:.8rem; box-shadow:var(--depth); }
.editorial .topic-card .topic-copy b { font-size:.9rem; line-height:1.45; font-weight:600; }
.editorial .topic-card .topic-copy small { margin-block-start:.25rem; }
.editorial .journal-article, .editorial .policy {
    border:1px solid var(--line); padding:clamp(1rem,3.6vw,2.7rem);
    border-radius:var(--surface-radius); background:var(--paper); box-shadow:var(--depth);
}
.editorial .footer {
    --footer-ink:#f0f6fc;
    --footer-muted:#b6cadc;
    --footer-accent:#65dfff;
    --footer-rule:rgb(161 208 235 / .23);
    border-block-start:1px solid #244e67;
    background:radial-gradient(ellipse at 82% 0%,rgb(0 168 232 / .13),transparent 58%), #071526;
    color:var(--footer-ink);
}
.editorial .footer .footer-highlight {
    color:inherit; background:rgb(127 197 236 / .08); border-color:var(--footer-rule);
    box-shadow:0 12px 26px -24px rgb(0 0 0 / .8); border-radius:var(--surface-radius);
    padding:clamp(1rem,3vw,1.9rem); margin-block-end:clamp(1.65rem,3.5vw,2.6rem);
}
.editorial .footer .footer-highlight p { color:inherit; font-weight:600; line-height:1.6; }
.editorial .footer .footer-inner { padding-block:clamp(1.85rem,4.5vw,3.1rem) 1rem; }
.editorial .footer-columns { gap:clamp(1.3rem,3vw,2.7rem); }
.editorial .footer-columns nav { gap:.45rem; }
.editorial .footer-columns h2, .editorial .footer .brand { color:var(--footer-ink); }
.editorial .footer nav a, .editorial .footer .brand-wordmark small { color:var(--footer-muted); font-weight:500; }
.editorial .footer nav a { text-decoration:none; }
.editorial .footer nav a:is(:hover,:focus-visible) { color:var(--footer-accent); text-decoration:underline; }
.editorial .footer :focus-visible { outline-color:var(--footer-accent); }
.editorial .footer .copyright { color:var(--footer-muted); border-color:var(--footer-rule); }

@media (max-width:52rem) {
    .edition-grid { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:40rem) {
    .header-information summary { min-height:2.75rem; display:flex; align-items:center; padding-inline:.5rem; }
    .editorial .top .brand { flex:0 1 auto; min-width:0; white-space:nowrap; }
    .editorial .top .brand-name {
        position:static; width:auto; height:auto; clip-path:none; overflow:hidden; text-overflow:ellipsis;
    }
    .header-information { margin-inline-start:auto; }
    .editorial .discovery-panel .topic-links { padding:.65rem .8rem; }
    .editorial .discovery-panel .topic-links a { padding-inline:.62rem; }
    .discovery-panel .journal-masthead.has-banner { grid-template-columns:minmax(0,1fr); }
    .discovery-panel .journal-mini { max-height:none; }
    .discovery-panel .journal-mini img { max-height:12rem; }
}

/* Publication masthead and lead edition */
.editorial { --edition-rule: color-mix(in srgb,var(--brand-primary,var(--ink)) 18%,var(--line)); }
.front-edition .top { border-block-end:1px solid var(--edition-rule); }
.front-edition .top .brand { justify-self:start; gap:.72rem; min-width:0; white-space:normal; }
.front-edition .top .brand-name { font-size:clamp(1.02rem,2.15vw,1.8rem); letter-spacing:normal; }
.front-edition .top .brand-name small { color:var(--muted); font-size:clamp(.72rem,.95vw,.86rem); }
.front-edition .discovery-panel { border-radius:.72rem; border-color:var(--edition-rule); box-shadow:var(--depth); }
.front-edition .discovery-panel .journal-masthead {
    border-radius:.64rem .64rem 0 0;
    padding:clamp(1.25rem,3vw,2.2rem) clamp(1rem,3.3vw,2.55rem);
    background:linear-gradient(145deg,var(--paper) 40%,var(--accent-soft));
    color:var(--ink);
}
.front-edition .journal-heading > p:not(.hero-eyebrow) { color:var(--muted); line-height:1.65; }
.front-edition .journal-intro h1 { font-size:clamp(1.85rem,3.3vw,3rem); line-height:1.12; }
.front-edition:lang(ar) .journal-intro h1 { line-height:1.26; }
.front-edition .discovery-panel .has-hero-ad {
    grid-template-columns:minmax(0,1fr) auto; align-items:center;
    column-gap:clamp(1.25rem,4vw,3.75rem);
}
.editorial .hero-ad {
    display:grid; grid-template:minmax(0,1fr) / minmax(0,1fr);
    justify-self:center; align-self:center; isolation:isolate;
    inline-size:252px; max-inline-size:100%; block-size:252px; min-block-size:252px;
    padding:1px;
}
.editorial .hero-ad > .managed-ad-unit {
    inline-size:250px; max-inline-size:100%; block-size:250px; color-scheme:light;
}
.hero-ad > .managed-ad-unit[data-ad-status="unfilled"] { display:none !important; }
.front-edition .journal-heading {
    border-inline-start:.25rem solid var(--brand-accent,var(--accent));
    padding-inline-start:clamp(.85rem,2vw,1.4rem);
}
.front-edition .discovery-panel .topic-links a { border-radius:.4rem; }
.front-edition .edition-grid { grid-template-columns:minmax(0,1.63fr) minmax(0,1fr); gap:clamp(1.3rem,3vw,2.8rem); }
.front-edition .edition-lead .card[data-featured] .guide-art { aspect-ratio:2/1; }
.front-edition .edition-lead .card[data-featured] { border-radius:.65rem; }
.front-edition .edition-digest .cards { box-shadow:none; border-radius:.65rem; }
.front-edition .edition-digest .card { padding-block:.9rem; }
.front-edition .edition-digest .card:first-child { padding-block-start:.85rem; }
.front-edition .edition-digest .card:last-child { padding-block-end:.85rem; }
.editorial .edition-section-title::before { background:var(--brand-accent,var(--accent)); }
.editorial .topic-card { position:relative; grid-template-columns:minmax(0,1fr); align-content:start; gap:.62rem; padding:.72rem; }
.editorial .topic-card .guide-art { aspect-ratio:2.45; }
.editorial .topic-card .topic-copy { padding-inline-end:1rem; }
.topic-arrow { position:absolute; inset-inline-end:.72rem; inset-block-end:.65rem; color:var(--accent-ink); font-size:.9rem; line-height:1; }

@media (max-width:52rem) {
    .front-edition .edition-grid, .front-edition .discovery-panel .has-hero-ad { grid-template-columns:minmax(0,1fr); }
    .front-edition .discovery-panel .has-hero-ad { row-gap:1.25rem; }
}
@media (max-width:40rem) {
    .front-edition .top .brand-name small { display:none; }
    .front-edition .top .brand-name { overflow-wrap:normal; }
    .front-edition .edition-lead .card[data-featured] .guide-art { aspect-ratio:16/9; }
}

/* Keep compact editorial labels readable in either reading direction. */
.editorial .top-links a,
.editorial .card-meta,
.editorial .card .category,
.editorial .guide-updated,
.editorial .article-meta,
.editorial .guide-type,
.editorial .topic-copy small { font-size:max(.875rem,14px); line-height:1.6; }
.editorial .card-meta { gap:.3rem .65rem; }
.editorial .edition-digest .card-meta { gap:.24rem .6rem; }
.editorial .card .category { padding:.17rem .55rem; }
.editorial .guide-updated time { unicode-bidi:isolate; font-variant-numeric:tabular-nums; white-space:nowrap; }
.editorial .topic-copy small { display:block; }
.editorial .discovery-panel .topic-links a,
.editorial .footer-cta {
    min-height:2.75rem; font-size:max(.875rem,14px); line-height:1.5; font-weight:600;
    overflow-wrap:break-word;
}
.editorial .footer-cta { max-width:100%; text-align:start; }
.editorial .top .brand-name small { font-size:max(.82rem,13px); line-height:1.55; letter-spacing:normal; }
.editorial:lang(ar) :is(.card-meta,.guide-updated,.category,.guide-type,.topic-copy small,.topic-links a,.footer-cta) {
    line-height:1.7; letter-spacing:normal;
}

/* Center incomplete rows in All guides without stretching its cards. */
@media (min-width:58.01rem) {
    .all-guides .cards { grid-template-columns:repeat(6,minmax(0,1fr)); }
    .all-guides .card { grid-column:span 2; }
    .all-guides .card:nth-child(3n+1):nth-last-child(2) { grid-column:2 / span 2; }
    .all-guides .card:nth-child(3n+1):last-child { grid-column:3 / span 2; }
    .edition-archive:not(.all-guides) .cards:has(> .card:nth-child(2):last-child) { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .edition-archive:not(.all-guides) .card:nth-child(3n+1):last-child { grid-column:1/-1; grid-template-columns:minmax(0,.85fr) minmax(0,1fr); grid-template-rows:auto; }
}
@media (min-width:34.01rem) and (max-width:58rem) {
    .all-guides .cards { grid-template-columns:repeat(4,minmax(0,1fr)); }
    .all-guides .card { grid-column:span 2; }
    .all-guides .card:nth-child(odd):last-child { grid-column:2 / span 2; }
}
@media (min-width:42.01rem) and (max-width:58rem) {
    .edition-archive:not(.all-guides) .card:nth-child(2n+1):last-child { grid-column:1/-1; grid-template-columns:minmax(0,.85fr) minmax(0,1fr); grid-template-rows:auto; }
}

@media (min-width:64rem) and (min-height:48rem) {
    .front-edition .edition-digest { position:sticky; inset-block-start:8rem; }
}

.editorial .theme-toggle {
    flex:none; display:inline-grid; place-items:center; inline-size:2.75rem; block-size:2.75rem;
    padding:0; border:1px solid var(--line); border-radius:.55rem; background:var(--paper); color:var(--ink);
}
.editorial .theme-toggle[hidden], .theme-sun, [data-theme="dark"] .theme-moon { display:none; }
[data-theme="dark"] .theme-sun { display:initial; }
.brand-symbol-nj rect { fill:transparent; }

html[data-theme="dark"] { color-scheme:dark; background:#0a1421; }
[data-theme="dark"] .editorial {
    --ink:#edf5fc; --muted:#b4c7da; --line:#30465b; --accent-ink:#83dcfa;
    --paper:#142436; --backdrop:#0a1421; --accent-soft:#1a3448; --accent-line:#365c75;
    --depth:0 2px 9px rgb(0 0 0 / .2);
    --control-depth:0 1px 2px rgb(0 0 0 / .24);
    --hover-depth:0 3px 12px rgb(0 0 0 / .32);
}
[data-theme="dark"] .editorial .brand-symbol-nj polygon:first-of-type { fill:var(--ink); }
[data-theme="dark"] .editorial :is(input,select,textarea,th) { background:var(--paper); color:var(--ink); border-color:var(--line); }
[data-theme="dark"] .editorial ::placeholder { color:var(--muted); }
[data-theme="dark"] .editorial :is(.language,.guide-search button):hover { background:var(--accent-soft); color:var(--ink); }
[data-theme="dark"] .editorial .guide-search button { background:#78d9fb; color:#0f2942; border-color:transparent; }
[data-theme="dark"] .editorial .guide-search button:hover { background:#9ce5ff; color:#0f2942; }
[data-theme="dark"] .editorial :is(.guide-type,.answer,.article-takeaways,.career-resource,.property-estimate) {
    background:var(--accent-soft); color:var(--ink); border-color:var(--accent-line);
}
[data-theme="dark"] .editorial .salary-results[data-negative] .salary-balance { background:#42282a; color:#ffd9d3; }
[data-theme="dark"] .editorial .footer-cta { color:var(--brand-on-accent,#0f2942); }
[data-theme="dark"] .editorial .ad { color-scheme:light; }
@media (max-width:40rem) {
    .editorial .theme-toggle { inline-size:2.35rem; }
}

.editorial .header-tools { display:flex; align-items:center; flex:none; gap:.42rem; margin-inline-start:auto; }
.editorial .header-tools :is(.language,.theme-toggle,summary) {
    display:inline-flex; justify-content:center; align-items:center; gap:.38rem;
    min-height:0; height:2.65rem; margin:0; padding:0 .64rem;
    color:var(--ink); background:var(--paper); border:1px solid var(--line);
    border-radius:.58rem; font-size:.85rem; font-weight:650; line-height:1.2;
}
.editorial .header-tools .theme-toggle { width:2.65rem; padding:0; }
.editorial .header-tools .theme-toggle[hidden] { display:none; }
[data-theme] .editorial .header-tools .theme-toggle[hidden] { display:inline-flex; visibility:hidden; }
.header-tools summary { list-style:none; white-space:nowrap; }
.header-tools summary::-webkit-details-marker { display:none; }
.header-tools svg { flex:none; }
.editorial .header-tools :is(.language,.theme-toggle,summary):is(:hover,:focus-visible),
.editorial .header-tools details[open] summary { background:var(--accent-soft); border-color:var(--accent-line); }
.editorial .top-inner {
    display:grid; grid-template-columns:minmax(0,1fr) minmax(12rem,19rem) auto;
    gap:.65rem clamp(.5rem,1.5vw,1.2rem); padding-block:.65rem 0;
}
.editorial .top .brand { min-inline-size:0; }
.editorial .top-links {
    grid-column:1/-1; margin:0; padding-block:0;
    border-block-start:1px solid var(--edition-rule);
}
.editorial .top .guide-search {
    min-inline-size:0; width:100%; max-width:none; margin:0; padding:.2rem;
    border-color:var(--line); box-shadow:none;
}
.editorial .top .guide-search input { min-inline-size:0; padding:.22rem .55rem; font-size:1rem; }
.editorial .top .guide-search button {
    flex:none; min-block-size:2rem; max-inline-size:55%; padding:.2rem .6rem;
    white-space:normal; overflow-wrap:anywhere;
    background:var(--brand-accent,var(--accent)); color:var(--brand-on-accent,#0f2942);
    font-size:.875rem;
}
.editorial .top .guide-search button:is(:hover,:focus-visible) { background:var(--accent-soft); color:var(--ink); }
.editorial :is(#content,.article-body [id],#guide-faq,.salary-panel) { scroll-margin-block-start:8.5rem; }
.editorial .sidebar-links { inset-block-start:8.5rem; max-height:calc(100dvh - 9rem); }
.front-edition .top .site-logo {
    --masthead-logo-size:clamp(2.65rem,4.35vw,3.75rem);
    inline-size:var(--masthead-logo-size); block-size:var(--masthead-logo-size);
}
.front-edition .top .brand-name { font-size:clamp(1rem,2vw,1.58rem); line-height:1.18; }
.front-edition .top .brand-name small { margin-block-start:.12rem; line-height:1.4; }
@media(max-width:52rem) {
    .editorial .top-inner { grid-template-columns:minmax(0,1fr) auto; gap:.45rem; }
    .editorial .top .guide-search { grid-area:2 / 1 / 3 / -1; }
    .editorial :is(#content,.article-body [id],#guide-faq,.salary-panel) { scroll-margin-block-start:11rem; }
    .editorial .sidebar-links { inset-block-start:11rem; max-height:calc(100dvh - 11.5rem); }
}
@media(max-width:40rem) {
    .editorial .header-tools { gap:.28rem; }
    .editorial .header-tools :is(.language,.theme-toggle,summary) { height:2.45rem; min-inline-size:2.45rem; padding-inline:.4rem; }
    .editorial .header-tools .theme-toggle { width:2.45rem; }
    .header-info-label { position:absolute; inline-size:1px; block-size:1px; clip-path:inset(50%); overflow:hidden; white-space:nowrap; }
    .front-edition .top .site-logo { --masthead-logo-size:2.35rem; }
    .front-edition .top .brand { gap:.5rem; }
}
@media(max-width:22.5rem) {
    .front-edition .discovery-panel .has-hero-ad { padding-inline:.6rem; }
}

@media (min-width:58.01rem) {
    .editorial .footer-columns { grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr); }
}
.editorial .footer-columns nav a { line-height:1.55; overflow-wrap:anywhere; }

/* Hover elevation changes paint only, including on cards beside reserved slots. */
.editorial .header-tools :is(.language,.theme-toggle,summary),
.editorial :is(.guide-search button,.footer-cta) { box-shadow:var(--control-depth); }
.editorial :is(.card,.topic-card):focus-within { border-color:var(--accent-line); }

@media (hover:hover) and (pointer:fine) {
    .editorial :is(.card,.topic-card):hover,
    .editorial .header-tools :is(.language,.theme-toggle,summary):hover,
    .editorial :is(.discovery-panel .topic-links a:not([aria-current]),.article-share :is(button,[data-share-channel])):hover {
        border-color:var(--accent-ink);
        box-shadow:var(--hover-depth);
    }
    .editorial :is(.guide-search button,.footer-cta):hover { box-shadow:var(--hover-depth); }
    .editorial .discovery-panel .topic-links a:not([aria-current]):hover { background:var(--accent-soft); }
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
    .editorial :is(.card,.topic-card,.header-tools :is(.language,.theme-toggle,summary),
        .discovery-panel .topic-links a,.guide-search button,.footer-cta,.article-share :is(button,[data-share-channel])) {
        transition:border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
    }
}

/* UI_POLISH_CARDS_V1 */
.card { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-3px); border-color: #cbd5e1; box-shadow: 0 12px 28px rgb(15 41 66 / .09); }
.card > .guide-art img { transition: transform .35s ease; }
.card:hover > .guide-art img { transform: scale(1.03); }
.card-copy p { line-height: 1.65; }
.read-link { transition: gap .18s ease, color .18s ease; }
.card:hover .read-link { gap: .75rem; color: var(--ink); }

/* UI_POLISH_HEADER_V1 */
.editorial .top { backdrop-filter: saturate(140%) blur(8px); }
.editorial .top-links a { border-radius: .45rem; padding-inline: .45rem; transition: color .18s ease, background-color .18s ease; }
.editorial .top-links a:hover { background: rgb(0 168 232 / .08); text-decoration: none; }
.editorial .top-links a[aria-current] { background: rgb(0 168 232 / .12); color: var(--ink); text-decoration: none; box-shadow: inset 0 -2px 0 var(--accent); }
.editorial .language { transition: background-color .18s ease, border-color .18s ease, transform .18s ease; }
.editorial .language:active { transform: scale(.98); }

/* UI_POLISH_ARTICLE_V1 */
.article-layout .reading { border-radius: .9rem; }
.article-body p, .article-body li { line-height: 1.75; }
.sidebar-panel { transition: border-color .18s ease, box-shadow .18s ease; }
.sidebar-panel:hover { border-color: #cbd5e1; box-shadow: 0 8px 20px rgb(15 41 66 / .05); }
.sidebar-panel a { border-radius: .35rem; transition: color .18s ease, padding-inline-start .18s ease; }
.sidebar-panel a:hover { color: var(--ink); padding-inline-start: .35rem; }
.footer-columns nav a { border-radius: .35rem; transition: color .18s ease; }
.footer-columns nav a:hover { color: var(--ink); }
