#mobile-menu[hidden], #mobile-featured[hidden], #mobile-return[hidden],
#mobile-search[hidden], #mobile-latest[hidden] { display: none; }

html[data-raitank-desktop] #mobile-return {
    display: block;
    position: fixed;
    inset: 16px auto auto 50%;
    transform: translateX(-50%);
    z-index: 101;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #f2e950;
    background: #000;
    color: #f2e950;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    cursor: pointer;
}
#mobile-return:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

@media screen and (max-width: 980px) {
    html:not([data-raitank-desktop]) {
        body { min-width: 0; }
        #wrapper { width: auto; margin: 0; }
        #main, #header, #branding, #blog-title, #container, #content, #siteinfo,
        #forum_container, #forum_content {
            box-sizing: border-box;
            width: 100%;
            margin: 0;
        }
        #container, #forum_container { float: none; padding-inline: 12px; }
        #header {
            background-image: url("/wp-content/themes/neuticaplus/header-images/058.jpg");
            background-size: auto clamp(94px, 27vw, 200px);
        }
        #branding, #blog-title { display: block; float: none; }
        #header #blog-title a {
            box-sizing: border-box;
            width: 100%;
            height: clamp(94px, 27vw, 200px);
            line-height: normal;
            padding: 0;
        }
        /* The wordmark is baked into the existing rotating photographs. */
        #header #blog-title a span {
            position: absolute;
            visibility: visible;
            clip-path: inset(50%);
        }
        #access, #sidebar, #main > .anythingSlider, #title-navigation { display: none; }

        #mobile-menu, #mobile-featured {
            display: block;
            background: #000;
            color: #f2e950;
        }
        #mobile-menu > summary, #mobile-featured > summary {
            box-sizing: border-box;
            cursor: pointer;
            min-height: 44px;
            padding: 10px 12px;
            font-weight: bold;
        }
        #mobile-menu > summary { list-style: none; text-align: right; font-size: 26px; }
        #mobile-menu > summary::-webkit-details-marker { display: none; }
        body:is(.slug-about, .archive.date:has(.archive-date-list)) #mobile-menu {
            position: relative;
        }
        body:is(.slug-about, .archive.date:has(.archive-date-list)) #mobile-menu > summary {
            position: absolute;
            inset: auto 0 100% auto;
            display: grid;
            place-items: center;
            width: 44px;
            height: 44px;
            padding: 0;
            background: #000;
        }
        #mobile-menu nav > * {
            display: flex;
            align-items: center;
            gap: 10px;
            box-sizing: border-box;
            width: 100%;
            min-height: 44px;
            padding: 10px 12px;
            border: 0;
            border-top: 1px solid #f2e950;
            border-radius: 0;
            background: #000;
            color: #f2e950;
            text-align: left;
            font: inherit;
        }
        #mobile-menu nav > *::before, #mobile-search button::before {
            content: "";
            flex: none;
            display: block;
            width: 18px;
            height: 18px;
            background: currentColor;
            mask: var(--icon) center / contain no-repeat;
        }
        #mobile-menu nav > :nth-child(1) {
            --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 5h6v6m0-6-9 9m0-8H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-4'/%3E%3C/svg%3E");
        }
        #mobile-menu nav > :nth-child(2) {
            --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v5H4zM5 9v11h14V9m-10 4h6'/%3E%3C/svg%3E");
        }
        #mobile-menu nav > :nth-child(3) {
            --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12a10 10 0 1 1-20 0 10 10 0 0 1 20 0Zm-10-1v6m0-10h.01'/%3E%3C/svg%3E");
        }
        #mobile-menu button {
            --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h18v13H3zm9 13v4m-4 0h8'/%3E%3C/svg%3E");
        }
        #mobile-search button {
            --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 10a6 6 0 1 1-12 0 6 6 0 0 1 12 0Zm-2 4 6 6'/%3E%3C/svg%3E");
        }
        #mobile-menu button { cursor: pointer; }
        #mobile-featured { margin: 12px 12px 16px; }
        #mobile-featured > summary, #mobile-featured li > a,
        #mobile-search h2, #mobile-latest { font-size: 14px; }
        #mobile-featured ul, #mobile-featured li { margin: 0; padding: 0; list-style: none; }
        #mobile-featured li {
            border-top: 1px solid rgb(0 0 0 / 22%);
            background: #f2e950;
        }
        #mobile-featured li > a {
            display: flex;
            align-items: center;
            box-sizing: border-box;
            min-height: 44px;
            margin: 0;
            padding: 8px 12px;
            color: #000;
            font-weight: bold;
            overflow-wrap: anywhere;
        }
        #mobile-search {
            display: block;
            padding: 36px 0;
            border-block: 3px solid #000;
            margin: 0 0 10px;
        }
        #mobile-search h2, #mobile-latest {
            display: block;
            margin: 0 0 8px;
            padding: 0;
            font-weight: bold;
            line-height: 1.4;
        }
        #mobile-search form { position: relative; margin: 0; }
        #mobile-search input {
            box-sizing: border-box;
            width: 100%;
            min-height: 44px;
            margin: 0;
            padding: 8px 48px 8px 14px;
            border: 1px solid #000;
            border-radius: 999px;
            background: transparent;
            color: #000;
            font: inherit;
            font-size: 16px;
        }
        #mobile-search input::placeholder { color: #333; }
        #mobile-search button {
            position: absolute;
            inset: 0 1px 0 auto;
            display: grid;
            place-items: center;
            width: 44px;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: transparent;
            color: #000;
            cursor: pointer;
        }

        #mobile-featured li > a:is(:hover, :focus, :active),
        #content .archive-date-list a:is(:hover, :focus, :active),
        #content .archive-date-list .widget_archive li:is(:hover, :focus-within, :active),
        #content .archive-date-list .widget_archive li:is(:hover, :focus-within, :active) > a {
            background: #000;
            color: #f2e950;
        }
        #mobile-featured a::selection, #content .archive-date-list a::selection {
            background: #000;
            color: #f2e950;
        }
        #mobile-menu a[href="/archives/date/index.html"],
        #mobile-menu a[href="/about/index.html"],
        #content:has(> .archive-date-list) > .page-title,
        #content .slug-about > .entry-title { text-transform: uppercase; }

        #content > .archive-date-list,
        #content .archive-date-list ul {
            margin: 0;
            padding: 0;
            list-style: none;
        }
        #content:has(> .archive-date-list) > .page-title {
            margin: 22px 0 8px;
            padding: 0;
            background: transparent;
            color: #000;
            font-size: 28px;
            font-weight: 600;
            line-height: 1.3;
            letter-spacing: -0.0125em;
        }
        #content > .archive-date-list,
        #content .slug-about > .entry-content {
            border: 1px solid #000;
            padding: 15px 8px 0;
        }
        #content .archive-date-list > li:first-child > p {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
            gap: 4px;
            margin: 8px 0;
        }
        #content .archive-date-list .archive-year-separator { display: none; }
        #content .archive-date-list > li:first-child a {
            display: grid;
            place-items: center;
            min-height: 44px;
            border: 1px solid #000;
            font-size: 14px;
        }
        /* The page heading already labels the list. */
        #content .archive-date-list .widgettitle { display: none; }
        #content .archive-date-list a { margin: 0; color: #000; }
        #content .archive-date-list .widget_archive li > a { padding: 0; }
        #content .archive-date-list .widget_archive li {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 44px;
            padding-inline: 10px;
            border-bottom: 1px solid rgb(0 0 0 / 24%);
            font-size: 14px;
            font-variant-numeric: tabular-nums;
        }
        #content .archive-date-list .widget_archive li > a::after {
            content: "";
            position: absolute;
            inset: 0;
        }

        body.home.blog.paged #content { margin-top: 12px; }
        body.single #content,
        body.slug-about #content,
        #content:has(> .archive-date-list) { border-top: 0; }
        #content .hentry.slug-about { border-bottom: 0; }
        #content, #forum_content { overflow-wrap: anywhere; }
        #content .entry-title, #content .entry-meta, #content .entry-utility,
        #content .entry-content, #content .page-title, #content .archive-meta,
        #forum_content .entry-forum_title, #forum_content .entry-forum_content,
        #content .error404, #content .noresults,
        #comments, #nav-above, #nav-below {
            box-sizing: border-box;
            width: 100%;
            min-height: 0;
            float: none;
            margin-inline: 0;
        }
        body.home.blog.paged #nav-above { display: none; }
        #content .entry-title {
            margin-block: 0 8px;
            padding: 0;
            line-height: 1.3;
            text-wrap: balance;
        }
        #content .entry-title a { margin: 0; padding: 0; }
        #content .entry-utility, #content .entry-meta { display: block; }
        #content .entry-content, #forum_content .entry-forum_content {
            display: flow-root;
            padding-inline: 0;
        }
        #content .entry-content p, #comments .comment-content p {
            font-size: 16px;
            line-height: 1.65;
        }
        #content .entry-thumb-image {
            position: static;
            width: clamp(96px, 29%, 185px);
            height: auto;
            margin: 2px 12px 6px 0;
        }
        #content .excerpt-post .entry-utility { padding-block: 4px; }
        #content .excerpt-post .meta-utility {
            display: inline;
            border: 0;
            padding-inline: 0 6px;
        }
        #content .excerpt-post .entry-content {
            display: block;
            width: auto;
            clear: none;
        }
        #content .excerpt-post .entry-content p { font-weight: normal; }
        #content img, #forum_content img, #content video {
            max-width: 100%;
            height: auto;
        }
        #content .entry-content img { margin-inline: 0; }
        #content .slug-about .entry-content > p { font-size: 1.12em !important; }
        #content .slug-about .entry-content img.alignleft { margin-right: 12px; }
        #content .slug-about .entry-content img.alignright { margin-left: 12px; }
        body.single #content .entry-content p.mobile-clear-image-floats {
            clear: both;
            padding-block-start: 12px;
        }
        body.single #content .entry-content .mobile-unfloat:not([hidden]) {
            display: block;
            float: none !important;
            clear: both;
            margin-block-end: 8px;
        }
        #content :is(iframe, embed, object, textarea, input),
        #forum_content :is(iframe, embed, object, textarea, input) { max-width: 100%; }
        #content .entry-content :is(.wp-caption, .imagebox, div[style*="width"]) {
            box-sizing: border-box;
            max-width: 100%;
        }
        #content .entry-content blockquote { margin-inline: 0; }
        #content :is(table, pre), #forum_content :is(table, pre) {
            display: block;
            max-width: 100%;
            overflow-x: auto;
        }
        #content .entry-content ul#archives-page,
        #content .entry-content ul#archives-page > li {
            display: block;
            float: none;
            box-sizing: border-box;
            width: 100%;
            margin-inline: 0;
        }
        #content .entry-content #archives-page a { min-height: 28px; }
        #content #comments-list ul.children > li { margin-left: 12px; }
        #content .nav-previous, #content .nav-next { max-width: 50%; }
        #content .navigation a { display: inline-block; min-height: 44px; box-sizing: border-box; }
        #content .archive-video-preview[href="https://vimeo.com/141366090"] {
            width: 100%;
            margin-inline: 0;
        }
        #siteinfo { padding-inline: 12px; }
        .archive-viewer-close { min-height: 44px; }
    }
}
