body {
    --sorio-site-width: 1360px;
    --sorio-gutter: clamp(14px, 2.6vw, 36px);
    --sorio-wide: min(var(--sorio-site-width), calc(100% - var(--sorio-gutter) * 2));
}

header .wrap:is(.nav-row, .topbar-inner),
body .inner-main > .wrap,
body .inner-main > .page-content.wrap.narrow,
body.home main > section.wrap,
body.home main > section > .wrap,
footer .wrap:is(.footer-grid, .copyright),
body .sorio-turbo-home {
    box-sizing: border-box;
    width: var(--sorio-wide) !important;
    max-width: var(--sorio-site-width) !important;
    margin-inline: auto !important;
    padding-inline: 0;
}

body .standard-page > .page-content > .entry-content {
    width: 100%;
    max-width: none;
}

/* Preserve a readable measure for editorial paragraphs inside the shared layout. */
.standard-page > .page-content > .entry-content > :is(p, blockquote, ul, ol) {
    max-inline-size: 80ch;
}

header .nav-row { gap: clamp(10px, 1.6vw, 24px); min-height: 74px; }
header .nav-row > .brand { flex: 0 0 auto; }
header .nav-row .sorio-main-logo { width: clamp(130px, 14vw, 188px); height: auto; }
header .header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
header .header-actions :is(.account-button, .desktop-cta) {
    border-radius: 12px;
    min-height: 44px;
    width: max-content;
    padding: 8px 13px;
    flex-shrink: 0;
    white-space: nowrap;
}
header .header-actions .desktop-cta { background: #5939d6; color: #fff; }
header .header-actions .desktop-cta:hover { background: #6848e7; }
header .menu-toggle { min-width: 44px; min-height: 44px; }
.site-nav > .menu > li > :is(a, button) { white-space: nowrap; }
.site-nav .sorio-turbo-menu > a { color: #e6daff; }
.site-nav .sorio-turbo-menu.current-menu-item > a { background: #34275d; border-radius: 10px; }
.site-nav .sorio-submenu-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}
.site-nav .sorio-submenu-toggle::after {
    content: '';
    width: 6px;
    height: 6px;
    border: solid currentColor;
    border-width: 0 0 2px 2px;
    transform: translateY(-2px) rotate(-45deg);
}
.site-nav .sorio-menu-group:is(.current-menu-ancestor, :hover) > .sorio-submenu-toggle,
.site-nav .sorio-submenu-toggle[aria-expanded=true] { background: #322650; color: #fff; }
header :is(a, button):focus-visible { outline: 2px solid #c5b2ff; outline-offset: 3px; }
.site-nav li.sorio-menu-group { position: relative; }
.site-nav .sorio-menu-group > ul.sub-menu {
    display: none !important;
    visibility: visible;
    opacity: 1;
    transform: none;
    min-width: 215px;
    padding: 7px;
    margin: 0;
    border: 1px solid #e6ddfa;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 35px #18112d30;
    z-index: 20;
}
.site-nav .sorio-submenu-toggle[aria-expanded=true] + ul.sub-menu { display: block !important; }
.site-nav .sorio-menu-group > ul.sub-menu a {
    display: block;
    padding: 9px 11px;
    border-radius: 8px;
    color: #241a42;
    white-space: nowrap;
}
.site-nav .sorio-menu-group > ul.sub-menu a:is(:hover, :focus-visible),
.site-nav .sorio-menu-group > ul.sub-menu .current-menu-item > a { background: #efe8ff; color: #3a2386; }

.sorio-turbo .sorio-turbo-hero { padding: clamp(20px, 4vw, 56px); background: linear-gradient(125deg,#151127,#322053); }
.sorio-turbo .sorio-turbo-hero h2 { font-size: clamp(1.6rem, 3vw, 2.55rem); line-height: 1.45; margin: 0 0 12px; }
.sorio-turbo .sorio-turbo-hero p { color: #f0eafa; max-width: 48ch; }
.sorio-turbo .sorio-turbo-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%, 17.5rem), 1fr)); gap: clamp(12px, 1.5vw, 22px); }
.sorio-turbo .sorio-turbo-card { --turbo-card-accent: #764cc2; padding: clamp(16px, 2vw, 24px); gap: 12px; border-block-start-color: var(--turbo-card-accent); }
.sorio-turbo .sorio-turbo-card[data-topic=health] { --turbo-card-accent: #187c6f; background: linear-gradient(#edf8f5,#fff 55%); }
.sorio-turbo .sorio-turbo-card[data-topic=construction] { --turbo-card-accent: #a9521b; background: linear-gradient(#fff4e8,#fff 55%); }
.sorio-turbo [data-topic=health] .sorio-turbo-topic { background: #d6f0e9; color: #135c52; }
.sorio-turbo [data-topic=construction] .sorio-turbo-topic { background: #f8e5ce; color: #813e19; }
.sorio-turbo .sorio-turbo-card[data-topic=technology] { --turbo-card-accent: #2862ae; background: linear-gradient(#edf4ff,#fff 55%); }
.sorio-turbo .sorio-turbo-card[data-topic=business] { --turbo-card-accent: #994062; background: linear-gradient(#fdf1f6,#fff 55%); }
.sorio-turbo [data-topic=technology] .sorio-turbo-topic { background: #dceaff; color: #234f89; }
.sorio-turbo [data-topic=business] .sorio-turbo-topic { background: #f8dde8; color: #7d3050; }
.sorio-turbo-home .sorio-turbo-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%, 14rem), 1fr)); }
.sorio-turbo .sorio-turbo-card-bottom { min-height: 42px; align-items: center; }
.sorio-turbo .sorio-turbo-topics a { min-height: 42px; display: inline-flex; align-items: center; }

body.sorio-ui-active .standard-page > .page-content > .entry-content >
    :is(.sorio-dashboard, .sorio-auth-page, .sorio-market:not(.embedded), .sorio-order-page, .sorio-seo-landing) {
    width: 100% !important;
    max-width: 100% !important;
    margin-inline: auto !important;
    transform: none !important;
}
body.sorio-ui-active .sorio-seo-landing :is(.sorio-seo-hero, .sorio-seo-points, .sorio-buying-guide, .sorio-seo-market),
body.sorio-ui-active .sorio-market :is(.sorio-market-head, .sorio-market-layout) { max-width: 100% !important; }
.sorio-dashboard .sorio-dash-top h1 { line-height: 1.45; }
.sorio-dashboard .sorio-dash-nav a:is(.active, [aria-current="page"]) { color: #fff !important; background: #4a3390 !important; }
.sorio-dashboard[data-role="publisher"] .sorio-dash-nav a:is(.active, [aria-current="page"]) { background: #20685b !important; }
.sorio-dashboard .sorio-dash-top, .sorio-dashboard .sorio-dash-heading { gap: 10px; }

@media (min-width: 1101px) {
    header .nav-row > .menu-toggle { display: none; }
    header .nav-row > .site-nav { display: block; position: static; flex: 1 1 auto; width: auto; height: auto; overflow: visible; background: transparent; padding: 0; border: 0; box-shadow: none; }
    header .nav-row > .site-nav > .menu { display: flex; align-items: center; flex-wrap: nowrap; gap: clamp(4px, .75vw, 14px); margin: 0; padding: 0; }
    header .nav-row > .site-nav > .menu > li { flex: 0 0 auto; width: auto; margin: 0; border: 0; }
    header .header-actions .desktop-cta { display: inline-flex; }
    .site-nav .sorio-menu-group > ul.sub-menu { position: absolute; inset-block-start: 100%; inset-inline-start: 0; }
}
@media (max-width: 1100px) {
    header .nav-row { min-height: 62px; }
    header .header-actions .desktop-cta { display: none; }
    .site-nav .sorio-menu-group > ul.sub-menu { position: static; box-shadow: none; min-width: 0; }
}
@media (max-width: 600px) {
    header .header-actions .account-button { padding-inline: 8px; }
    .sorio-turbo .sorio-turbo-card { gap: 9px; }
    .sorio-turbo .sorio-turbo-topics { gap: 7px; }
    .sorio-turbo .sorio-turbo-detail-grid > * { min-width: 0; }
    .sorio-dashboard .sorio-dash-top { flex-wrap: wrap; }
}
