html,body {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
a {
    color: #959595;
    text-decoration: none;
}

.content-center-wrap {
    text-align:center;
    width:100%;
}

.content-center {
    max-width:1060px;
    margin:0 auto;
    text-align:left;
}

.logo-div {
    border-radius:50%;
    width:36px;
    height:36px;
    background-color: var(--bg-card);
    position:relative;
    margin:5px;
}

@media (max-width: 480px) {
    .logo-div {
	width:30px;
	height:30px;
    }
}

.logo-part {
    position:absolute;
    width:36%;
}
.logo-runner {
    left:16%;
    bottom:17%;
}
.logo-cloud {
    right:10%;
    top:17%;
}

#desktop_menu {
    margin-left:20px;
}

#header {
    position: relative;
    z-index: 99;
}
@media (max-width: 1080px) {
    #header {
	padding: 0 10px;
/*	position:absolute;*/
	top:0;
	left:0;
	z-index:1001;
	width:100%;
	box-sizing: border-box; /* layout_content doesn't load tailwind's global border-box reset; without this, width:100% + padding overflows on mobile */
    }
    #content {
	margin-top:0px;
/*	padding: 0 10px;*/

    }
    #mobile_header {
	font-size:14px;
	display:block;
	color: var(--fg-strong);
	padding:5px 10px;
	text-align:center;
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	max-width: 50%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	pointer-events: none;
    }

    #mobile_menu_button, #mobile_search_button {
	z-index:1001;
	display:block;
    }
    #desktop_menu, #user_button, #header_search {
	display:none !important;
    }

    /* Mobile search box styles */
    #mobile_search_box {
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	bottom: 0;
	transition: opacity 0.3s ease-out;
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: env(safe-area-inset-top, 0) 6px 0 6px;
	background: var(--bg-card);
    }

    #mobile_search_box.mobile-search-collapsed {
	opacity: 0;
	pointer-events: none;
    }

    #mobile_search_box.mobile-search-expanded {
	opacity: 1;
	pointer-events: auto;
    }

    /* Search input container takes remaining width - comes first in flex order */
    #mobile_search_box .place-search-inline {
	flex: 1;
	max-width: none;
	order: 1;
    }

    /* Adjust input styling for mobile search */
    #mobile_search_box .place-search-input {
	padding: 6px 10px;
	font-size: 14px;
	height: 32px;
	box-sizing: border-box;
    }

    #mobile_search_box > div:first-child {
	flex: 1;
	margin: 0 4px;
	padding: 2px 6px;
	background: var(--bg-card);
	border-radius: 8px;
	border: 1px solid var(--border-subtle);
	box-shadow: var(--shadow-input);
    }

    /* Close button in mobile search box - comes after input in flex order */
    #mobile_search_close {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-card);
	border-radius: 8px;
	border: 1px solid var(--border-subtle);
	box-shadow: var(--shadow-button);
	order: 2;
	cursor: pointer;
	transition: all 0.2s ease;
    }

    #mobile_search_close svg {
	width: 16px;
	height: 16px;
	transition: stroke 0.2s ease;
    }

    /* Hide mobile header and search button when search is expanded */
    #header:has(#mobile_search_box.mobile-search-expanded) #mobile_header {
	display: none !important;
    }

    #header:has(#mobile_search_box.mobile-search-expanded) #mobile_search_button {
	display: none !important;
    }

    #header:has(#mobile_search_box.mobile-search-expanded) #mobile_menu_button {
	display: none !important;
    }

    #mobile_search_button {
	margin-right: 6px; /* Bring closer to hamburger menu */
	-webkit-tap-highlight-color: transparent;
	-webkit-touch-callout: none;
	user-select: none;
    }
}

@supports (padding: env(safe-area-inset-top)) {
    #content {
/*	margin-top: calc(env(safe-area-inset-top, 0));*/
    }
    #header {
	padding:env(safe-area-inset-top, 0) 10px 0 10px;
    }
}

@media (max-width: 400px) {
    #mobile_header {
	font-size:12px;
    }
}
@media (min-width: 1080px) {
    #header {
	padding: 0 50px;
	position: sticky;
	top: 0;
	z-index: 200;
    }
    /* When the offline banner (utils.js) is visible, push the sticky header
       down by the banner's height (~36px) so it sits below the banner instead
       of being obscured by it. body.is-offline is toggled by utils.js. */
    body.is-offline #header { top: 36px; }
    #mobile_header {
	display:none;
    }
    #mobile_menu_button, #mobile_search_button {
	display:none;
    }
    #mobile_search_box {
	display:none;
    }
    #desktop_menu {
	display:flex;
    }
    #user_button {
	display:block;
    }
}

#mobile_menu_popup {
    z-index:1001;
    display:none;
    position:absolute;
    right:5px;
    top:calc(env(safe-area-inset-top, 0px) + 5px);
}

#header_search {
    margin-left:auto;
}
#user_button {
    padding-left:20px;
}
#header_right {
    display:flex;
}
.user-icon {
    display:inline-block;
    width:24px;
    height:24px;
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

#user_details {
    position:absolute;
    right:5px;
    top:50px;
    z-index:4;
    background-color: var(--bg-card);
    padding:12px;
    border: 2px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: var(--shadow-popover);
}
#mobile_header img {
    display:inline-block;
    width:16px;
    height:16px;
    margin-right:4px;
    margin-bottom:4px;
    filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

#user_details_account {
    display:none;
}

.user-details-cta {
    display: flex;
}

.account-button-wrap {
    padding:0;
    margin:5px;
    background-color: var(--bg-muted);
    border-radius:6px;
    border:1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.account-button-wrap:hover {
    background-color: var(--bg-muted-hover);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.account-button-wrap a {
    color: var(--fg-strong) !important;
    font-weight: 500;
    padding: 8px 20px;
    display:block;
    text-decoration: none;
}

.account-button-wrap a:hover {
    color: var(--brand-blue) !important;
}

.account-button-wrap-logout {
    background-color: var(--warn-bg);
    border-color: var(--warn-border);
}

.account-button-wrap-logout:hover {
    background-color: var(--warn-bg-hover);
}


#register_login,#subscribe_login,#verify,#registration_x {
    display:none;
}

.logged-out, .logged-in {
    display:none;
}

:root {
    --sat: env(safe-area-inset-top);
    --sar: env(safe-area-inset-right);
    --sab: env(safe-area-inset-bottom);
    --sal: env(safe-area-inset-left);
}

/********************** */
.map-marker {
    width:16px;
    height:16px;
    cursor: pointer;
}

.map-marker-current-position {
    background-image: url('/images/fa/solid/crosshairs.svg');
    filter: invert(100%) drop-shadow(0 0 2px #000);
}

.map-marker-radar {
    background-image: url('/images/fa/regular/dot-circle.svg');
}

.map-marker-radar-light {
    background-image: url('/images/fa/light/dot-circle.svg');
    opacity: 0.7;
}


.modal-message-inner {
    padding:20px;
}

@media (max-width: 1080px) {
    .product-table {
	font-size:10px;
    }
    #current_plan_note {
	font-size:10px !important;
    }
}

.footer-links a {
    color: var(--fg-soft);
}


/* Hide the entire container if the ad is unfilled */
.ad-container:has(ins.adsbygoogle[data-ad-status="unfilled"]) {
    display: none !important;
}

/* Hide unfilled ads - Backup if has not available*/
ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* Hide the remove-ads link that comes right after an unfilled ad */
ins.adsbygoogle[data-ad-status="unfilled"] + .remove-ads {
    display: none !important;
}

/********* Neo *********/
.neo {
    display:flex;
    width:100%;
    gap:0;
    margin-bottom: 0;
}

/* Radio buttons get container border */
.neo:has(input[type=radio]) {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* Checkboxes don't need container border, items have their own */
.neo:has(input[type=checkbox]) {
    padding: 0;
}
.neo input[type=radio], .neo input[type=checkbox], .neo-radio input[type=radio] {
    display: none;
}

/* Label */
.neo input[type=radio] + label, .neo input[type=checkbox] + label, .neo-radio input[type=radio] + label {
    padding: 8px 6px;
    margin-bottom: 0;
    color: #6b6b6b;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: #f5f5f5;
    line-height: 1.2;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    font-size: 0.8125rem;

    display: block;
    margin: 0;
    border-right: 1px solid #e0e0e0;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    white-space: nowrap;
}

/* Spacing for checkboxes to indicate multi-select */
.neo input[type=checkbox] + label {
    margin: 0 2px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}
/* Remove border on last item for radio only */
.neo input[type=radio]:last-of-type + label {
    border-right: none;
}

@media (max-width: 500px) {
    .neo input[type=radio] + label, .neo input[type=checkbox] + label, .neo-radio input[type=radio] + label {
	font-size:10px;
	padding:6px 4px;
	min-height:32px;
	display:flex;
	align-items:center;
	justify-content:center;
    }
}
@media (max-width: 360px) {
    .neo input[type=radio] + label, .neo input[type=checkbox] + label, .neo-radio input[type=radio] + label {
	font-size:10px;
	padding:6px 2px;
	min-height:32px;
    }
}

/* Hover */
.neo input[type=radio]:hover + label {
    background-color: #e6f4FF;
}
.neo input[type=checkbox]:hover + label {
    background-color: #e6f4FF;
    border-color: #d0d0d0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.12), 0 2px 3px rgba(0,0,0,0.06);
}
.neo-radio input[type=radio]:hover + label {
    background-color: #e6f4ff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

/* Checked */
.neo input[type=radio]:checked + label, .neo input[type=checkbox]:checked + label {
    background: linear-gradient(to bottom, #edf8ff 0%, #dde8ef 50%, #cdd8df 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.05);
    color: #002965;
}
.neo-radio input[type=radio]:checked + label {
    background: linear-gradient(to bottom, #e6f0ff 0%, #d6e0ef 50%, #c6d0df 100%);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    color: #002965;
}

/* Equal Width */
.neo.equal-width {
    display: inline-flex;
    gap: 4px;
}
.neo.equal-width input[type=radio] + label, .neo.equal-width input[type=checkbox] + label {
    margin: 0;
    white-space: nowrap;
    min-width: 101px;
}
.neo-radio.equal-width input[type=radio] + label {
    flex: 1;
    white-space: nowrap;
}

/* Radio (grouped) */
.neo-radio {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    width: 100%;
    gap: 0;
    align-items: center;
    margin-bottom: 0;
}
.neo-radio input[type=radio] + label {
    display: block;
    margin: 0;
    border: none;
    border-right: 1px solid #e0e0e0;
    border-radius: 0;
    box-shadow: none;
    flex: 1;
    display:flex;
    justify-content:center;
}
.neo-radio input[type=radio]:last-of-type + label {
    border-right: none;
}


/******************************************/
/* Native range input styling */
input[type="range"] {
    margin: 0;
    display: flex;
    align-items: center;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border-radius: 4px;
    position:relative;
}

/* Webkit/Chrome track */
input[type="range"]::-webkit-slider-runnable-track {
    height: 0.5em;
    background: #CCC;
    border-radius: 4px;
}

/* Firefox track */
input[type="range"]::-moz-range-track {
    height: 0.5em;
    background: #CCC;
    border-radius: 4px;
    border: none;
}

/* Webkit/Chrome thumb */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #AAA;
    border-radius: 5px;
    width: 18px;
    height: 18px;
    margin-top: -6px;
    cursor: pointer;
}

/* Firefox thumb */
input[type="range"]::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    background: #AAA;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

/* Hover effects */
input[type="range"]:hover::-webkit-slider-thumb {
    background: #888;
}

input[type="range"]:hover::-moz-range-thumb {
    background: #888;
}

/******************************************/

.remove-ads {
    font-size:11px;
    text-align:right;
    text-decoration: dotted;
    text-decoration-line: underline;
    padding-right:10px;
}
.remove-ads a {
        color:#004;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


.social-block {
    display:flex;
    margin:0;
    justify-content:space-around;
    padding:0;
    font-size:12px;
    background-color:transparent;
    color:#374151;
    width:100%;
    align-items:center;
    gap:12px;
}

.social-block img {
    width:24px;
    height:24px;
    display:inline-block;
}

.social-block img.bsky {
    width:27px;
}
.social-block img.youtube {
    width:34px;
}

.social-block-desktop {
    display:flex;
}

.social-block-mobile {
    display:none;
}

@media (max-width: 1080px) {
    .animation-meta-element.social-block-desktop {
	display:none;
    }
    .social-block-mobile {
	display:flex;
	height:30px;
    }
    div#animation_meta {
	margin:0;
    }
    .social-block img {
	width:16px;
	height:16px;
    }
    .social-block img.bsky {
	width:20px;
    }
    .social-block img.youtube {
	width:26px;
	height:auto;
    }
}

.no-pwa {
    display:none;
}

.header-inner {
    display:flex;
    align-items:center;
    justify-content:space-between;
    height:56px;
    padding:0 12px;
}

@media (max-width: 1023px) {
  .header-inner {
    height: 44px;
    padding: 0 6px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 44px;
    padding: 0 0px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 40px;
    padding: 0 0px;
  }
}

.mobile-header-button svg {
    height:16px;
    width:16px;
}

/* PWA Header Navigation - back/forward buttons in header, only visible in PWA mode */
#pwa-header-nav {
    display: none;
    align-items: center;
    gap: 4px;
}

body.is-pwa #pwa-header-nav {
    display: flex;
}

/* Keep content area gray */
body.is-pwa #content {
    background-color: var(--bg-card-hover);
}

#pwa-header-nav button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

#pwa-header-nav button:not(:disabled):hover {
    background: var(--bg-card-hover);
}

#pwa-header-nav button:not(:disabled):active {
    background: var(--border-subtle);
}

#pwa-header-nav button:disabled {
    opacity: 0.35;
    cursor: default;
}

#pwa-header-nav button svg {
    width: 16px;
    height: 16px;
    stroke: var(--fg-strong);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#pwa-header-nav button:disabled svg {
    stroke: var(--fg-faint);
}

/* Hide PWA nav on desktop */
@media (min-width: 1080px) {
    #pwa-header-nav {
        display: none !important;
    }
}

/* PWA Pull-to-refresh indicator */
#pwa-pull-indicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50px);
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: transform 0.15s ease, opacity 0.15s ease;
    z-index: 10000;
    --rotation: 0deg;
}

#pwa-pull-indicator svg {
    width: 20px;
    height: 20px;
    stroke: var(--fg-strong);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: rotate(var(--rotation));
    transition: transform 0.1s ease;
}

#pwa-pull-indicator.refreshing svg {
    animation: pwa-spin 0.8s linear infinite;
}

@keyframes pwa-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================
 * Layout chrome moved out of inline styles + onmouseover JS.
 * Hex values are still literal here; will become var(--*) once
 * the token foundation lands.
 * ============================================================ */

body {
    margin: 0;
}

/* Header — extends #header / .logo-div / #header_search etc. above */
#header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-default);
    box-shadow: var(--shadow-card);
}

.logo-div {
    border: 1px solid var(--border-default);
    transition: background-color 0.2s ease;
}
.logo-div:hover, .logo-div:focus-visible {
    background-color: var(--bg-card-hover);
}

#header_search {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 4px 8px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-input);
}

.header-nav {
    display: flex;
    gap: 40px;
}

.header-nav-link {
    font-size: 1rem;
    color: var(--fg-strong);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}
.header-nav-link:hover, .header-nav-link:focus-visible {
    color: var(--brand-blue);
}

.user-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border-radius: 50%;
    border: 1px solid var(--border-default);
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}
.user-link:hover, .user-link:focus-visible {
    background-color: var(--bg-card-hover);
}
.user-link img {
    width: 20px;
    height: 20px;
    filter: opacity(0.7);
}

#mobile_header {
    font-weight: 600;
}

.mobile-header-button button {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-button);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.mobile-header-button button:hover,
.mobile-header-button button:focus-visible {
    background-color: var(--bg-card-hover);
}

/* Mobile menu popup (rendered by _mobile_menu.html.erb) */
.mobile-menu-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.mobile-menu-inner {
    padding: 16px;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-menu-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--fg-strong);
}

.mobile-menu-close {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 6px;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.mobile-menu-close:hover, .mobile-menu-close:focus-visible {
    background-color: var(--bg-card-hover);
}
.mobile-menu-close svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 0.75rem;
    column-gap: 1rem;
}

.mobile-menu-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--fg-strong);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s ease;
}
.mobile-menu-link:hover, .mobile-menu-link:focus-visible {
    color: var(--brand-blue);
}

/* Site footer (rendered by _footer.html.erb) */
.site-footer {
    text-align: center;
    line-height: 1.8;
}

.site-footer.main {
    margin: 0 auto 20px auto;
    padding: 20px 12px;
    background: var(--bg-card);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--fg-muted);
}

.site-footer.compact {
    margin: 0 20px 20px 20px;
    font-size: 14px;
    color: var(--fg-soft);
}

.site-footer-link {
    text-decoration: none;
    font-weight: 500;
}
.site-footer.main .site-footer-link {
    color: var(--brand-blue);
}
.site-footer.compact .site-footer-link {
    color: var(--fg-soft);
}

.site-footer-divider {
    color: var(--border-strong);
    margin: 0 6px;
}

.site-footer-install-icon {
    width: 18px;
    height: 14px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.site-footer-social {
    margin-top: 12px;
}

.site-footer-social a {
    display: inline-block;
    margin: 0 6px;
}

.site-footer-social img {
    height: 16px;
    width: 16px;
    vertical-align: middle;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.site-footer-social a:hover img,
.site-footer-social a:focus-visible img {
    opacity: 1;
}

.site-footer-social img.yt {
    width: 20px;
    height: 16px;
}

.site-footer-copyright {
    margin-top: 12px;
    font-size: 0.75rem;
}
